专利摘要:
An image decoding method, according to the present invention, may comprise the steps of: inducing multiple reference sample lines for a current block; selecting at least one of the multiple reference sample lines; determining whether to apply an intra-filter to a reference sample included in the selected reference sample line; according to the decision, selectively applying the intra-filter to the reference sample; and executing intra-prediction for the current block using the reference sample.
公开号:ES2699691A2
申请号:ES201890079
申请日:2017-06-22
公开日:2019-02-12
发明作者:Bae Keun Lee
申请人:KT Corp;
IPC主号:
专利说明:

[0001]
[0002] Method and apparatus for processing video signals
[0003]
[0004] Technical field
[0005]
[0006] The present invention relates to a method and an apparatus for processing video signals.
[0007]
[0008] Background of the technique
[0009]
[0010] Currently, requests for high-resolution, high-quality images have increased as high-definition (HD) and ultra-high definition (UHD) images have increased in various fields of application. However, the higher resolution and image quality data have increasing amounts of data compared to conventional image data. Therefore, when image data is transmitted using a medium such as conventional wireless and wired broadband networks, or when image data is stored using a conventional storage medium, the transmission and storage cost increases. To solve these problems that occur with an increase in the resolution and quality of image data, high efficiency image coding / decoding techniques can be used.
[0011]
[0012] Image compression technology includes various techniques, including: an inter-prediction technique of predicting a pixel value included in a current snapshot from a previous or subsequent snapshot of the current snapshot; an intra prediction technique of predicting a pixel value included in a current snapshot that uses pixel information in the current snapshot; an entropy coding technique for assigning a short code to a value with a high frequency of occurrence and assigning a long code to a value with a low frequency of appearance; etc. The image data can be compressed effectively using such image compression technology, and can be transmitted or stored.
[0013]
[0014] Meanwhile, with requests for high-resolution images, requests for stereographic image content, which is a new image service. A video compression technique is being analyzed to effectively provide stereo image content with high resolution and ultra high resolution.
[0015]
[0016] Divulgation
[0017]
[0018] Technical problem
[0019]
[0020] An object of the present invention is intended to provide a method and an apparatus for efficiently performing intra prediction for an encoding / decoding target block by encoding / decoding a video signal.
[0021]
[0022] An object of the present invention aims to provide a method and an apparatus for performing an intra prediction for a coding / decoding target block based on a plurality of reference lines.
[0023]
[0024] An object of the present invention aims to provide a method and an apparatus for applying an intra-filter to at least one of a plurality of reference lines.
[0025]
[0026] An object of the present invention aims to provide a method and apparatus for adaptively determining an intra prediction mode or an intra prediction mode number according to a reference line used for the intra prediction of a current block.
[0027]
[0028] The technical objects to be achieved by the present invention are not limited to the aforementioned technical problems. And, other technical problems that are not mentioned will be understood clearly by those skilled in the art from the following description.
[0029]
[0030] Technical solution
[0031]
[0032] A method and an apparatus for decoding a video signal according to the present invention can derive a plurality of reference sample lines for a current block, select at least one among the plurality of reference sample lines, determine whether to apply a intra filter to a reference sample included in the selected reference sample line, selectively apply the intra filter to the reference sample according to the determination, and perform an intra prediction for the current block using the reference sample.
[0033]
[0034] A method and apparatus for encoding a video signal according to the present invention can derive a plurality of reference sample lines for a current block, select at least one among the plurality of reference sample lines, determine whether to apply a intra filter to a reference sample included in the selected reference sample line, selectively applying the intra filter to the reference sample according to the determination, and performing an intra prediction for the current block using the reference sample.
[0035]
[0036] In the method and apparatus for encoding / decoding a video signal according to the present invention, whether to apply the intra-filter is determined based on a current block size, an intra-prediction mode of the current block or a position of the sample of selected reference.
[0037]
[0038] In the method and apparatus for encoding / decoding a video signal according to the present invention, an intra filter type is determined based on a current block size, an intra prediction mode of the current block or a sample position of selected reference.
[0039]
[0040] In the method and apparatus for encoding / decoding a video signal according to the present invention, wherein the plurality of reference sample lines are classified into a plurality of groups, and a type of intra filter is determined according to with a group in which the selected reference sample line is included.
[0041]
[0042] In the method and apparatus for encoding / decoding a video signal according to the present invention, a number of the intra prediction modes available for the current block are determined adaptively based on a position of the reference sample line selected
[0043]
[0044] In the method and apparatus for encoding / decoding a video signal according to the present invention, it is determined whether the current block is available for use a non-directional intra prediction mode based on a position of the selected reference sample line.
[0045]
[0046] In the method and apparatus for encoding / decoding a video signal according to the present invention, selecting at least one among the plurality of reference sample lines is performed based on an intra prediction mode of the current block or a number of intra prediction mode available for the current block.
[0047]
[0048] The features briefly summarized above for the present invention are only illustrative aspects of the detailed description of the invention that follows, but do not limit the scope of the invention.
[0049]
[0050] Advantageous effects
[0051]
[0052] In accordance with the present invention, an effective intra prediction can be performed for a target coding / decoding block.
[0053]
[0054] In accordance with the present invention, an intra prediction can be performed for a target coding / decoding block based on a plurality of reference lines.
[0055]
[0056] In accordance with the present invention, an intra-filter can be applied to at least one of a plurality of reference lines.
[0057]
[0058] According to the present invention, an intra prediction mode or an intra prediction mode number can be determined adaptively according to a reference line used for the intra prediction of a current block.
[0059]
[0060] The effects obtainable by the present invention are not limited to the aforementioned effects, and other effects not mentioned may be easily understood by those skilled in the art from the description below.
[0061] Description of the drawings
[0062]
[0063] Figure 1 is a block diagram illustrating a device for encoding a video according to an embodiment of the present invention.
[0064]
[0065] Figure 2 is a block diagram illustrating a device for decoding a video according to an embodiment of the present invention.
[0066]
[0067] Figure 3 is a diagram illustrating an example of hierarchical partitioning of an encoding block based on a tree structure according to an embodiment of the present invention.
[0068]
[0069] Figure 4 is a diagram illustrating a type of partition in which binary tree-based partitioning is permitted according to an embodiment of the present invention.
[0070]
[0071] Figure 5 is a diagram illustrating an example in which only a binary tree-based partition of a predetermined type according to an embodiment of the present invention is allowed.
[0072]
[0073] Figure 6 is a diagram for explaining an example in which information related to the permissible number of binary tree partitioning is encoded / decoded, according to an embodiment to which the present invention is applied.
[0074]
[0075] Figure 7 is a diagram illustrating a partition mode applicable to a coding block according to an embodiment of the present invention.
[0076]
[0077] Figure 8 is a diagram illustrating types of predefined intra prediction modes for a device for encoding / decoding a video according to an embodiment of the present invention.
[0078]
[0079] Figure 9 is a diagram illustrating a class of extended intra prediction modes according to an embodiment of the present invention.
[0080]
[0081] Figure 10 is a flow diagram that briefly illustrates an intra-method prediction according to an embodiment of the present invention.
[0082]
[0083] Figure 11 is a diagram illustrating a method of correcting a prediction sample of a current block based on differential information from neighboring samples according to an embodiment of the present invention.
[0084]
[0085] Figures 12 and 13 are diagrams illustrating a method of correcting a prediction sample based on a predetermined correction filter according to an embodiment of the present invention.
[0086]
[0087] Figure 14 shows a range of reference samples for the intra prediction according to an embodiment to which the present invention is applied.
[0088]
[0089] Figures 15 to 17 illustrate an example of filtration in reference samples according to an embodiment of the present invention.
[0090]
[0091] Figure 18 is a diagram illustrating a plurality of reference sample lines according to an embodiment of the present invention.
[0092]
[0093] Figure 19 is a diagram illustrating an example in which a use of an extended reference line according to a form of a current block is determined, according to an embodiment of the present invention.
[0094]
[0095] Figure 20 is a flowchart illustrating a method of performing intra prediction using an extended reference line in accordance with the present invention.
[0096]
[0097] Figure 21 is a diagram illustrating a plurality of reference lines for a non-square block according to the present invention.
[0098]
[0099] Figure 22 is a diagram for explaining an example in which a non-available reference sample is replaced by an available reference sample located in the shortest distance from the unavailable reference sample.
[0100]
[0101] Figures 23 and 24 are diagrams to explain an embodiment in which adaptively determining the position of a reference sample available according to a distance between an unavailable reference sample and an available reference sample included in the same reference line as the unavailable reference sample.
[0102]
[0103] Figures 25 and 26 are diagrams illustrating reference samples used to derive an average value from a reference line according to an embodiment to which the present invention is applied.
[0104]
[0105] Figure 27 is a flow chart illustrating processes for obtaining a residual sample according to an embodiment to which the present invention is applied.
[0106]
[0107] Embodiments of the invention
[0108]
[0109] A variety of modifications to the present invention can be made and various embodiments of the present invention exist, examples of which will now be provided with reference to the drawings and will be described in detail. However, the present invention is not limited thereto, and exemplary embodiments may be construed as including all modifications, equivalents, or substitutes in a technical concept and a technical scope of the present invention. Similar reference numbers refer to the similar element described in the drawings.
[0110]
[0111] The terms used in the descriptive memory, 'first', 'second', etc., can be used to describe various components, but the components are not to be construed as being limited to the terms. The terms are used only to differentiate a component from other components. For example, the 'first' component may be named the 'second' component without departing from the scope of the present invention, and the 'second' component may similarly be named the 'first' component. The term 'and / or' includes a combination of a plurality of elements or any one of a plurality of terms.
[0112]
[0113] It will be understood that when an element is simply referred to as is 'connected to' or 'coupled to' another element without being 'directly connected to' or 'directly coupled to' another element in the present description, it may be 'directly connected to' or 'directly coupled to' another element or connected ao coupled to another element, which has the other intermediate element between them. In contrast, it should be understood that when an element is referred to as being "directly coupled" or "directly connected" to another element, there are no intervening elements present.
[0114]
[0115] The terms used in the present specification are simply used to describe particular embodiments, and are not intended to limit the present invention. An expression used in the singular encompasses the expression of the plural, unless it has a clearly different meaning in the context. In the present specification, it is to be understood that terms such as "including", "having", etc., are intended to indicate the existence of features, numbers, steps, actions, elements, parts, or combinations of the same disclosed in the specification, and is not intended to exclude the possibility that one or more other characteristics, numbers, steps, actions, elements, parts, or combinations thereof may exist or be added.
[0116]
[0117] In the following, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. Hereinafter, the same constituent elements in the drawings are indicated by the same reference numerals, and a repeated description of the same elements will be omitted.
[0118]
[0119] Figure 1 is a block diagram illustrating a device for encoding a video according to an embodiment of the present invention.
[0120]
[0121] Referring to Figure 1, the device 100 for encoding a video may include: a snapshot partitioning module 110, prediction modules 120 and 125, a transform module 130, a quantization module 135, a reorganization module 160, an entropy coding module 165, an inverse quantization module 140, an inverse transform module 145, a filter module 150, and a memory 155.
[0122]
[0123] The constitutional parts shown in Figure 1 are shown in a manner independent to represent different characteristics of each other in the device to encode a video. Therefore, it does not mean that each constitutional part is constituted in a separate constitutional hardware or software unit. In other words, each constitutional part includes each of the constitutional parts listed for convenience. Therefore, at least two constitutional parts of each constitutional part can be combined to form a constitutional part or a constitutional part can be divided into a plurality of constitutional parts to perform each function. The embodiment where each constitutional part and the embodiment where a constitutional part is divided are also included in the scope of the present invention, if they do not depart from the essence of the present invention.
[0124]
[0125] Also, some of the constituents may not be indispensable constituents that perform essential functions of the present invention but be selective constituents that only improve the performance thereof. The present invention can be implemented by including only the essential constitutional parts to implement the essence of the present invention except the constituents used in improving performance. The structure that includes only the indispensable constituents except the selective constituents used to improve performance only is also included in the scope of the present invention.
[0126]
[0127] The snapshot partitioning module 110 can partition an input snapshot into one or more processing units. At this point, the processing unit can be a prediction unit (PU), a transform unit (TU), or a coding unit (CU). The snapshot partitioning module 110 can partition a snapshot into combinations of multiple encoding units, prediction units, and transform units, and can encode a snapshot by selecting a combination of coding units, prediction units, and transform units with a predetermined criterion (for example, cost function).
[0128]
[0129] For example, a snapshot can be partitioned into multiple encoding units. A recursive tree structure, such as a quad tree structure, can be used to partition a snapshot into coding units.
[0130] A coding unit that is partitioned into other coding units with a snapshot or a larger coding unit such as a root can be partitioned with child nodes corresponding to the number of partitioned coding units. A coding unit that is no longer partitioned into a predetermined limitation serves as a leaf node. That is, when it is assumed that only square partitioning is possible for one coding unit, one coding unit can be partitioned into four other coding units at most.
[0131]
[0132] In the following, in the embodiment of the present invention, the coding unit can mean a unit that performs coding or a unit that performs decoding.
[0133]
[0134] A prediction unit can be one of the partitioned partitions in a square or a rectangular shape that has the same size in a single coding unit, or a prediction unit can be one of the partitioned partitions to have a different shape / size in a single coding unit.
[0135]
[0136] When a prediction unit subjected to intra prediction is generated based on a coding unit and the coding unit is not the smallest coding unit, an intra prediction can be made without partitioning the coding unit into multiple prediction units NxN.
[0137]
[0138] The prediction modules 120 and 125 may include an inter prediction module 120 which performs inter prediction and an intra prediction module 125 which performs intra prediction. It can be determined whether to perform inter prediction or intra prediction for the prediction unit, and detailed information (e.g., an intra prediction mode, a motion vector, a reference snapshot, etc.) can be determined according to each prediction method. . At this point, the processing unit subject to prediction may be different from the processing unit for which the prediction method and detailed content is determined. For example, the prediction method, prediction mode, etc., can be determined by the prediction unit, and prediction can be made by the transform unit. A residual value (residual block) between the block of generated prediction and an original block can be introduced into the transform module 130. Also, the prediction mode information, the motion vector information, etc., used for prediction can be encoded with the residual value by the entropy coding module 165 and can be transmitted to a device to decode a video. When a particular coding mode is used, it is possible to transmit to a video decoding device by encoding the original block as it is without generating the prediction block through the prediction modules 120 and 125.
[0139]
[0140] The inter-prediction module 120 can predict the prediction unit based on information from at least one of a previous snapshot or a subsequent snapshot of the current snapshot, or it can predict the prediction unit based on information from some encoded regions in the current snapshot , in some cases. The inter-prediction module 120 may include a reference snapshot interpolation module, a motion prediction module, and a motion compensation module.
[0141]
[0142] The reference snapshot interpolation module may receive reference snapshot information from the memory 155 and may generate pixel information of a whole pixel or less than the entire pixel from the reference snapshot. In the case of luminance pixels, an 8-lead DCT-based interpolation filter can be used, which has different filter coefficients to generate pixel information of a whole pixel or less than an integer pixel in units of 1/4 pixel . In the case of chrominance signals, a 4-lead DCT-based interpolation filter having a different coefficient may be used to generate pixel information of a whole pixel or less than a whole pixel in units of 1/8 of a pixel.
[0143]
[0144] The motion prediction module can perform motion prediction based on the reference snapshot interpolated by the reference snapshot interpolation module. As methods to calculate a motion vector, various methods can be used, such as a full-search-based block adaptation algorithm (FBMA), a three-stage search (TSS), a three-stage search algorithm (NTS), etc. The motion vector can have a motion vector value in units of 1/2 of a pixel or of 1/4 of a pixel based on an interpolation pixel. The motion prediction module can predict a current prediction unit by changing the motion prediction method. As methods of motion prediction, various methods can be used, such as a jumping method, a joining method, an AMVP (Advanced Motion Vector Prediction) method, an intra block copy method, etc.
[0145]
[0146] The intra prediction module 125 may generate a prediction unit based on information from the reference pixel that is neighbor to a current block that is pixel information in the current snapshot. When the neighboring block of the current prediction unit is a block subjected to inter-prediction and therefore a reference pixel is a pixel subjected to inter-prediction, the reference pixel included in the block subjected to inter-prediction can be replaced by information of reference pixel of a neighboring block subjected to intra prediction. That is, when a reference pixel is not available, at least one reference pixel of available reference pixels can be used in place of information from the non-available reference pixel.
[0147]
[0148] Prediction modes in the intra prediction can include a directional prediction mode that uses reference pixel information depending on a prediction direction and a non-directional prediction mode that does not use directional information when making the prediction. A mode for predicting luminance information may be different from a mode for predicting chrominance information, and for predicting chrominance information, intra prediction mode information may be used to predict luminance information or expected luminance signal information.
[0149]
[0150] When performing intra prediction, when the size of the prediction unit is the same as the size of the transform unit, the intra prediction can be performed in the prediction unit based on pixels located on the left, top left and part top of the prediction unit. However, when performing intra prediction, when the size of the prediction unit is different from the size of the transform unit, intra prediction can be performed using a reference pixel based on the transform unit. Also, intra prediction can be used using NxN partitioning for only the coding unit smaller.
[0151] In the intra prediction method, a prediction block can be generated after applying an AIS filter (Intra Adaptive Smoothing) to a reference pixel depending on the prediction modes. The type of the AIS filter applied to the reference pixel may vary. To perform the intra prediction method, an intra prediction mode of the current prediction unit can be predicted from the intra prediction mode of the neighboring prediction unit to the current prediction unit. In predicting the prediction mode of the current prediction unit using predicted mode information from the neighboring prediction unit, when the intra prediction mode of the current prediction unit is the same as the intra prediction mode of the prediction unit. neighboring prediction, information can be transmitted indicating that the prediction modes of the current prediction unit and the neighboring prediction unit are equal to each other using predetermined flag information. When the prediction mode of the current prediction unit is different from the prediction mode of the neighboring prediction unit, entropy coding can be performed to encode prediction mode information of the current block.
[0152]
[0153] Also, a residual block can be generated that includes information about a residual value that is a different one between the predicted prediction unit and the original block of the prediction unit based on prediction units generated by the prediction modules 120 and 125. The residual block generated can be introduced into the transform module 130.
[0154]
[0155] The transform module 130 can transform the residual block including the information into the residual value between the original block and the prediction unit generated by the prediction modules 120 and 125 using a transform method, such as a discrete cosine transform (DCT). ), discrete sine transform (DST) and KLT. Whether to apply DCT, DST, or KLT to transform the residual block can be determined based on information from the intra prediction mode of the prediction unit used to generate the residual block.
[0156]
[0157] The quantization module 135 can quantize values transformed to a frequency domain by the transform module 130. The quantification coefficients may vary depending on the block or importance of a snapshot. The values calculated by the quantization module 135 can be provided to the module 140 inverse quantization and reorganization module 160.
[0158] The reorganization module 160 can rearrange coefficients of quantized residual values.
[0159]
[0160] The reorganization module 160 can change a coefficient in the form of a two-dimensional block into a coefficient in the form of a one-dimensional vector through a coefficient scanning method. For example, the reorganization module 160 can scan from a DC coefficient to a coefficient in the high frequency domain a zigzag scanning method to change the coefficients to be in the form of one-dimensional vectors. Depending on the size of the transform unit and the intra prediction mode, vertical direction scanning can be used where the coefficients are explored in the form of two-dimensional blocks in the column direction or horizontal direction scan where the block coefficients are scanned Two-dimensional in the row direction instead of zigzag scan. That is, it can be determined which scanning method is used between zigzag scanning, vertical direction scanning and horizontal direction scanning depending on the size of the transform unit and the intra prediction mode.
[0161]
[0162] The entropy coding module 165 can perform entropy coding based on the values calculated by the reorganization module 160. Entropy coding can use various coding methods, for example, exponential Golomb coding, adaptive variable length encoding according to context (CAVLC), and adaptive arithmetic binary coding according to context (CABAC).
[0163]
[0164] The entropy coding module 165 can encode a variety of information, such as residual value coefficient information and block type information of the coding unit, prediction mode information, partition unit information, unit information prediction, transform unit information, motion vector information, reference frame information, block interpolation information, filtering information, etc., from the reorganization module 160 and the prediction modules 120 and 125.
[0165] The entropy coding module 165 can encode entropy coefficients of the coding unit introduced from the reorganization module 160.
[0166]
[0167] The inverse quantization module 140 can quantize the values quantized by the quantization module 135 in reverse and the inverse transform module 145 can transform the transformed values by the transform module 130 in reverse. The residual value generated by the inverse quantization module 140 and the inverse transform module 145 can be combined with the prediction unit provided by a motion estimation module, a motion compensation module, and the intra prediction module of the modules 120 and 125 of prediction so that a reconstructed block can be generated.
[0168]
[0169] The filter module 150 may include at least one of a deblocking filter, a displacement correction unit, and an adaptive loop filter (ALF).
[0170]
[0171] The unblocking filter can eliminate block distortion that occurs due to the boundaries between the blocks in the reconstructed snapshot. To determine whether to perform unlock, the pixels included in various rows or columns in the block can be a basis for determining whether to apply the unlock filter to the current block. When the unblocking filter is applied to the block, an intense filter or a weak filter can be applied depending on the required unblocking filtering intensity. Also, when applying the unblocking filter, horizontal direction filtration and vertical direction filtration can be processed in parallel.
[0172]
[0173] The offset correction module can correct the offset with the original snapshot in units of one pixel in the snapshot subject to unlock. To perform offset correction in a particular snapshot, it is possible to use a displacement application method in consideration of edge information of each pixel or a pixel partitioning method of a snapshot in the predetermined number of regions, to determine a region to undergo to perform the displacement, and apply the displacement to the determined region.
[0174]
[0175] Adaptive loop filtering (ALF) can be performed based on the value obtained by comparing the filtered reconstructed snapshot and the original snapshot. The pixels Included in the snapshot can be divided into predetermined groups, a filter to be applied to each of the groups can be determined, and filtering can be done individually for each group. The information on whether to apply ALF and a luminance signal can be transmitted by coding units (CU). The filter shape and coefficient of a filter for ALF can vary depending on each block. Also, the filter for ALF in the same form (fixed form) can be applied independently of the characteristics of the target application block.
[0176]
[0177] The memory 155 can store the reconstructed block or snapshot calculated through the filter module 150. The stored reconstructed block or snapshot can be provided to the prediction modules 120 and 125 when performing inter prediction.
[0178]
[0179] Figure 2 is a block diagram illustrating a device for decoding a video according to an embodiment of the present invention.
[0180]
[0181] Referring to Figure 2, the device 200 for decoding a video may include: an entropy decoding module 210, a reorganization module 215, an inverse quantization module 220, a reverse transform module 225, modules 230 and 235 of prediction, a filter module 240, and a memory 245.
[0182]
[0183] When a video bitstream is input from the device to encode a video, the introduced bit stream can be decoded according to a reverse process of the device for encoding a video.
[0184]
[0185] The entropy decoding module 210 can perform entropy decoding according to an inverse entropy coding process by the entropy coding module of the device to encode a video. For example, corresponding to the methods performed by the device to encode a video, various methods can be applied, such as exponential Golomb coding, adaptive variable length encoding according to context (CAVLC), and adaptive arithmetic binary encoding according to context (CABAC).
[0186]
[0187] The entropy decoding module 210 can decode information about the intra prediction and inter prediction performed by the device to encode a video. The reorganization module 215 may perform reorganization in the entropy decoded bitstream by the entropy decoding module 210 based on the reorganization method used in the device to encode a video. The reorganization module can reconstruct and reorganize the coefficients in the form of one-dimensional vectors to the coefficient in the form of two-dimensional blocks. The reorganization module 215 may receive information related to coefficient scanning performed on the device to encode a video and may perform reorganization by a scanning method in reverse of the coefficients based on the scan order performed on the device to encode a video .
[0188]
[0189] The inverse quantization module 220 can perform inverse quantization based on a quantization parameter received from the device to encode a video and the reorganized coefficients of the block.
[0190]
[0191] The inverse transform module 225 can perform the inverse transform, i.e., inverse DCT, inverse DST, and inverse KLT, which is the inverse process of the transform, i.e., DCT, DST, and KLT, performed by the transform module in the result of quantification by the device to encode a video. The inverse transform can be performed based on a transfer unit determined by the device to encode a video. The reverse transform module 225 of the device for decoding a video can selectively perform transform schemes (e.g., DCT, DST, and KLT) depending on multiple pieces of information, such as the prediction method, the size of the current block , the prediction direction, etc.
[0192]
[0193] The prediction modules 230 and 235 can generate a prediction block based on information on the prediction block generation received from the entropy decoding module 210 and the previously decoded block or snapshot information received from the memory 245.
[0194]
[0195] As described above, as the operation of the device for encoding a video, when performing intra prediction, when the size of the prediction unit is the same as the size of the transform unit, the intra Prediction in the prediction unit based on the pixels on the left, top left, and top of the prediction unit. When performing intra prediction, when the size of the prediction unit is different from the size of the transform unit, intra prediction can be performed using a reference pixel based on the transform unit. Also, intra prediction can be used using NxN partitioning for only the smallest coding unit.
[0196]
[0197] The prediction modules 230 and 235 may include a prediction unit determination module, an inter prediction module, and an intra prediction module. The prediction unit determination module may receive a variety of information, such as prediction unit information, prediction mode information of an intra prediction method, information on prediction of movement of an inter prediction method, etc., from the entropy decoding module 210, it can divide a current coding unit into prediction units, and can determine whether inter prediction or intra prediction is performed in the prediction unit. Using information required in inter prediction of the current prediction unit received from the device to encode a video, the inter-prediction module 230 can perform inter-prediction in the current prediction unit based on information from at least one of a previous snapshot or a snapshot of the current snapshot that includes the current prediction unit. Alternatively, inter prediction can be performed based on information from some previously reconstructed regions in the current snapshot that includes the current prediction unit.
[0198]
[0199] To perform inter prediction, it can be determined for the encoding unit which of a hop mode, a join mode, an AMVP mode, and an inter block copy mode are used as the prediction method of movement of the prediction unit included in the coding unit.
[0200]
[0201] The intra-prediction module 235 can generate a prediction block based on pixel information in the current snapshot. When the prediction unit is a prediction unit subjected to intra prediction, the intra prediction can be performed based on information of the intra prediction mode of the prediction unit received from the device to encode a video. The intra module 235 The prediction can include an intra-adaptive smoothing filter (AIS), a reference pixel interpolation module, and a DC filter. It can be determined the AIS filter performs filtering on the reference pixel of the current block, and whether to apply the filter depending on the prediction mode of the current prediction unit. AIS filtering can be performed on the reference pixel of the current block using the prediction mode of the prediction unit and the AIS filter information received from the device to encode a video. When the prediction mode of the current block is a mode where AIS filtering is not performed, the AIS filter can not be applied.
[0202]
[0203] When the prediction mode of the prediction unit is a prediction mode in which the intra prediction is performed based on the pixel value obtained by interpolating the reference pixel, the reference pixel interpolation module can interpolate the reference pixel to generate the reference pixel of a whole pixel or smaller than a whole pixel. When the prediction mode of the current prediction unit is a prediction mode in which a prediction block is generated without interpolation of the reference pixel, the reference pixel can not be interpolated. The DC filter can generate a prediction block through filtering when the prediction mode of the current block is a CC mode.
[0204]
[0205] The reconstructed block or snapshot can be provided to the filter module 240. The filter module 240 may include the unlock filter, the offset correction module, and the ALF.
[0206]
[0207] Information on whether or not the unlock filter is applied to the corresponding block or snapshot and information on which of an intense filter and weak filter is applied when the unlock filter is applied can be received from the device to encode a video. The unlock filter of the device for decoding a video can receive information about the unlock filter from the device for encoding a video, and can perform unlock filtering in the corresponding block.
[0208]
[0209] The offset correction module may perform offset correction on the reconstructed snapshot based on the type of offset correction and offset value information applied to a snapshot when doing coding.
[0210]
[0211] The ALF can be applied to the coding unit based on information on whether to apply the ALF, ALF coefficient information, etc., received from the device to encode a video. The ALF information can be provided as being included in a particular set of parameters.
[0212]
[0213] The memory 245 may store the reconstructed snapshot or block for use as a snapshot or reference block, and may provide the reconstructed snapshot to an output module.
[0214]
[0215] As described above, in the embodiment of the present invention, for convenience of explanation, the coding unit is used as a term to represent a unit for coding, but the coding unit may serve as a unit for performing decoding as well as coding.
[0216]
[0217] In addition, a current block may represent an objective block to be encoded / decoded. And, the current block can represent a coding tree block (or a coding tree unit), a coding block (or a coding unit), a transform block (or a transform unit), a block of prediction (or a prediction unit), or the like depending on a coding / decoding stage.
[0218]
[0219] A snapshot can be encoded / decoded by dividing into base blocks that have a square shape or a non-square shape. At this time, the base block can be referred to as a coding tree unit. The coding tree unit can be defined as a coding unit of the largest size allowed within a sequence or cut. Information regarding whether the encoding tree unit has a square shape or has a non-square shape or information with respect to a size of the encoding tree unit can be signaled through a set of sequence parameters, a set of snapshot parameters, or a cut heading. The coding tree unit can be divided into smaller size partitions. At this time, if it is assumed that a depth of a partition generated by dividing the coding tree unit is 1, a depth of a partition generated dividing the partition having the depth of 1 can be defined as 2. That is, a partition generated by dividing a partition having a depth k in the coding tree unit can be defined as having a depth k + 1.
[0220]
[0221] A partition of arbitrary size generated by dividing an encoding tree unit can be defined as a coding unit. The coding unit can be recursively divided or divided into base units for prediction, quantization, transform, or loop filtering, and the like. For example, a partition of arbitrary size generated by dividing the coding unit can be defined as a coding unit, or it can be defined as a transform unit or a prediction unit, which is a base unit for prediction, quantization, transformation or loop filtration and the like.
[0222]
[0223] The partitioning of a coding tree unit or a coding unit may be performed based on at least one of a vertical line and a horizontal line. In addition, the number of vertical lines or horizontal lines that partition the coding tree unit or the coding unit may be at least one or more. For example, the coding tree unit or the coding unit can be divided into two partitions using a vertical line or a horizontal line, or the coding tree unit or the coding unit can be divided into three partitions using two vertical lines or two horizontal lines Alternatively, the coding tree unit or the coding unit may be partitioned into four partitions having a length and a width of 1/2 using a vertical line and a horizontal line.
[0224]
[0225] When a coding tree unit or a coding unit is divided into a plurality of partitions using at least one vertical line or at least one horizontal line, the partitions may have a uniform size or different size. As an alternative, any partition can have a different size than the remaining partitions.
[0226]
[0227] In the embodiments described below, it is assumed that a coding tree unit or a coding unit is divided into a quad tree structure or a binary tree structure. However, it is also possible to split a coding tree unit or a coding unit using a number greater than vertical lines or a greater number of horizontal lines.
[0228]
[0229] Figure 3 is a diagram illustrating an example of hierarchical partitioning of a coding block based on a tree structure according to an embodiment of the present invention.
[0230]
[0231] An input video signal is decoded in predetermined block units. A default unit of this type for decoding the input video signal is a coding block. The coding block can be a unit that performs intra / inter prediction, transform, and quantization. In addition, a prediction mode (e.g., intra prediction mode or inter prediction mode) is determined in units of a coding block, and the prediction blocks included in the coding block can share the determined prediction mode. The coding block can be a square or non-square block having an arbitrary size in a range of 8x8 to 64x64, or it can be a square or non-square block having a size of 128x128, 256x256, or greater.
[0232]
[0233] Specifically, the coding block can be partitioned hierarchically based on at least one of a quad tree and a binary tree. At this point, quad-tree-based partitioning can mean that a 2Nx2N coding block is partitioned into four NxN coding blocks, and binary tree-based partitioning can mean that a coding block is partitioned into two coding blocks. Even if partitioning based on a binary tree is performed, there may be a square-shaped coding block at the bottom depth.
[0234]
[0235] Partitioning based on a binary tree can be performed symmetrically or asymmetrically. The partitioned coding block based on the binary tree may be a square block or a non-square block, such as a rectangular shape. For example, a partition type in which partitioning based on a binary tree is allowed may comprise at least one of a symmetric type of 2NxN (non-square horizontal directional coding unit) or Nx2N (vertical square non-square coding unit) ), asymmetric type of nLx2N, nRx2N, 2NxnU, or 2NxnD.
[0236] Partitioning based on a binary tree can be limited to one of a symmetric or an asymmetric type partition. In this case, building the coding tree unit with square blocks may correspond to four-tree CU CU partitioning, and constructing the coding tree unit with symmetric non-square blocks may correspond to binary tree partitioning. Constructing the coding tree unit with square blocks and symmetrical non-square blocks can correspond to quad and binary tree CU partitioning.
[0237]
[0238] Partitioning based on a binary tree can be done in a coding block where partitioning based on a quad tree is no longer performed. Partitioning based on a quad tree can no longer be performed on the partitioned coding block based on the binary tree.
[0239]
[0240] Additionally, the partitioning of a lower depth can be determined depending on a partition type of a higher depth. For example, if partitioning based on a binary tree is allowed in two or more depths, only the same type as the binary tree partitioning of the upper depth in the lower depth can be allowed. For example, if binary tree-based partitioning at the top depth is performed with type 2NxN, partitioning based on a binary tree at the bottom depth is also performed with type 2NxN. As an alternative, if partitioning based on a binary tree at the top depth with type Nx2N is performed, partitioning based on a binary tree at the bottom depth with type Nx2N is also performed.
[0241]
[0242] On the contrary, it is also possible to allow, at a lower depth, only a different type of partitioning of a binary tree of a higher depth.
[0243]
[0244] It may be possible to limit only a specific type of partitioning based on a binary tree to be used for the sequence, cut, coding tree unit, or coding unit. As an example, only the 2NxN type or the Nx2N type of binary tree partitioning for the encoding tree unit can be allowed. An available partition type can be predefined in an encoder or decoder. Or you can encode information about the type of partition available or on the type of available partition and then signaling through a bit stream.
[0245] Figure 5 is a diagram illustrating an example in which only one specific type of partitioning based on a binary tree is allowed. Figure 5A shows an example in which only Nx2N type of partitioning based on a binary tree is allowed, and Figure 5B shows an example in which only type 2NxN of binary tree partitioning is allowed. To implement adaptive partitioning based on quadruple tree or binary tree, information indicating quadruple tree-based partitioning can be used, information about the size / depth of the coding block that quad-tree-based partitioning is allowed, information that indicates tree-based partitioning binary, information about the size / depth of the coding block that binary tree-based partitioning is allowed, information about the size / depth of the coding block that binary tree-based partitioning is not allowed, information about whether partitioning is performed based on binary tree in a vertical direction or a horizontal direction, etc.
[0246]
[0247] In addition, information can be obtained on the number of times a binary tree partitioning is permitted, a depth to which binary tree partitioning is allowed, or the number of depths allowed for binary tree partitioning for a unit. of coding tree or a specific coding unit. The information may be encoded in units of a coding tree unit or a coding unit, and may be transmitted to a decoder through a bit stream.
[0248]
[0249] For example, a syntax 'max_binary_depth_idx_minus1' indicating a maximum depth to which binary tree partitioning can be encoded can be encoded / decoded through a bit stream. In this case, max_binary_depth_idx_minus1 1 can indicate the maximum depth at which binary tree partitioning is allowed.
[0250]
[0251] Referring to the example shown in Figure 6, in Figure 6, the binary tree partitioning has been done for a coding unit having a depth of 2 and a coding unit having a depth of 3. Accordingly, it can be encoded / decoded through a bit stream to minus one of information indicating the number of times the binary tree partitioning has been performed in the coding tree unit (ie, 2 times), information indicating the maximum depth at which tree partitioning has been allowed binary in the coding tree unit (ie, depth 3), or the number of depths in which the binary tree partitioning has been performed in the coding tree unit (ie, 2 (depth 2 and depth 3 )).
[0252]
[0253] As another example, at least one of the following can be obtained: information on the number of times that binary tree partitioning is permitted, the depth at which binary tree partitioning is allowed, or the number of depths to which binary tree partitioning is allowed for each sequence or each cut. For example, the information can be encoded in units of a sequence, a snapshot, or a cutting unit and transmitted through a bit stream. Accordingly, at least one of the binary tree partitioning number in a first cut, the maximum depth at which binary tree partitioning is allowed in the first cut, or the number of depths in which tree partitioning is performed binary in the first cut can be differentiated from a second cut. For example, in the first cut, binary tree partitioning can be allowed for only one depth, while in the second cut, binary tree partitioning can be allowed for two depths.
[0254]
[0255] As another example, the number of times that binary tree partitioning is allowed, the depth at which binary tree partitioning is allowed, or the number of depths allowed for binary tree partitioning can be set differently according to a time-slice identifier (TemporalID) of a cut or snapshot. At this point, the temporary level identifier (TemporalID) is used to identify each of a plurality of video layers having a scalability of at least one of view, spatial, temporal or quality.
[0256]
[0257] As shown in Figure 3, the first coding block 300 with the partition depth (depth of division) of k can be partitioned into multiple second blocks of coding based on the quad tree. By For example, the second coding blocks 310 to 340 can be square blocks that are half the width and half the height of the first coding block, and the partition depth of the second coding block can be increased to k + 1.
[0258]
[0259] The second coding block 310 with the partition depth of k + 1 can be partitioned into multiple third coding blocks with the partition depth of k + 2. The partitioning of the second coding block 310 can be performed using selectively one of the quad tree and the binary tree depending on a partitioning method. At this point, the partitioning method can be determined based on at least one of the information indicating quad-tree-based partitioning and the information indicating binary tree-based partitioning.
[0260]
[0261] When the second coding block 310 is partitioned based on the quadruple tree, the second coding block 310 may be partitioned into four third coding blocks 310a having half the width and half the height of the second coding block, and the depth The partition of the third coding block 310a can be increased to k + 2. In contrast, when the second coding block 310 is partitioned based on the binary tree, the second coding block 310 can be partitioned into two third coding blocks. At this point, each of the two third coding blocks can be a non-square block having one half the width and half the height of the second coding block, and the partition depth can be increased to k + 2. The second coding block can be determined as a non-square block of a horizontal direction or a vertical direction depending on a partitioning direction, and the partitioning direction can be determined based on information on whether partitioning based on a binary tree is performed in an address vertical or a horizontal direction.
[0262]
[0263] Meanwhile, the second coding block 310 can be determined as a sheet coding block that is no longer partitioned based on the quad tree or the binary tree. In this case, the sheet coding block can be used as a prediction block or a transform block.
[0264] As the partitioning of the second coding block 310, the third coding block 310a can be determined as a sheet coding block, or it can be further partitioned based on the quad tree or the binary tree. Meanwhile, the third partition coding block 310b based on the binary tree can be further partitioned into coding blocks 310b-2 of a vertical direction or coding blocks 310b-3 of a horizontal direction based on the binary tree, and the depth of partition of the relevant coding blocks can be increased to k + 3. Alternatively, the third coding block 310b can be determined as a sheet coding block 310b-1 that is no longer partitioned based on the binary tree. In this case, the coding block 310b-1 can be used as a prediction block or a transform block. However, the above partitioning process can be performed in a limited manner based on at least one of the information about the size / depth of the coding block that quad-tree-based partitioning is allowed, the information about the size / depth of the coding block that partitioning based on binary tree is allowed, and information about the size / depth of the coding block that partitioning based on binary tree is not allowed.
[0265]
[0266] A number of a candidate representing a size of a coding block can be limited to a predetermined number, or a size of a coding block in a predetermined unit can have a fixed value. As an example, the size of the coding block in a sequence or in a snapshot can be limited to 256x256, 128x128 or 32x32. The information indicating the size of the coding block in the sequence or in the snapshot can be signaled through a sequence header or a snapshot header.
[0267]
[0268] As a result of partitioning based on a quadruple tree and a binary tree, a coding unit can be represented as a square or rectangular shape of an arbitrary size.
[0269]
[0270] A coding block is encoded using at least one of a hop mode, intra prediction, inter prediction, or a hop method. Once a coding block is determined, a prediction block can be determined through predictive partitioning of the coding block. The predictive partitioning of the code block can be done by a partition mode (Part_mode) that indicates a partition type of the code block. A size or shape of the prediction block can be determined according to the partition mode of the coding block. For example, a size of a prediction block determined according to the partition mode may be equal to or smaller than a size of a coding block.
[0271]
[0272] Figure 7 is a diagram illustrating a partitioning mode that can be applied to a coding block when the code block is coded by inter prediction.
[0273]
[0274] When an inter-prediction coding block is encoded, one of 8 partitioning modes may be applied to the coding block, as in the example shown in Figure 4.
[0275]
[0276] When an intra prediction coding block is encoded, a PART_2Nx2N partition mode or a PART_NxN partition mode may be applied to the coding block.
[0277]
[0278] PART_NxN can be applied when a coding block has a minimum size. At this point, the minimum size of the coding block can be predefined in an encoder and in a decoder. Or, information can be signaled with respect to the minimum size of the coding block by a bit stream. For example, the minimum size of the code block can be signaled through a cut header, so that the minimum size of the code block can be defined by each cut.
[0279]
[0280] In general, a prediction block can have a size of 64x64 to 4x4. However, when coding a block by inter prediction, it can be restricted that the prediction block does not have a size of 4x4 to reduce memory bandwidth when performing motion compensation.
[0281]
[0282] Figure 8 is a diagram illustrating types of predefined intra prediction modes for a device for encoding / decoding a video according to an embodiment of the present invention.
[0283]
[0284] The device for encoding / decoding a video can perform the intra prediction using one of predefined intra prediction modes. The predefined intra prediction modes for the intra prediction can include non-directional prediction modes (eg, a planar mode, a CC mode) and 33 directional prediction modes.
[0285]
[0286] Alternatively, to improve intra prediction accuracy, a greater number of directional prediction modes may be used than the 33 directional prediction modes. That is, M can be defined with extended directional prediction modes by subdividing angles of the directional prediction modes (M> 33), and a directional prediction mode having a predetermined angle can be derived using at least one of the 33 predefined directional prediction modes .
[0287]
[0288] A greater number of intra prediction modes may be used than the intra prediction modes shown in Figure 8. For example, a greater number of intra prediction modes may be used than the 35 intra prediction modes by subdividing prediction mode angles. directional or deriving a directional prediction mode having a predetermined angle using at least one of a predefined number of directional prediction modes. At this time, the use of a greater number of intra prediction modes than the 35 intra prediction modes may be referred to as an extended intra prediction mode.
[0289]
[0290] Figure 9 shows an example of extended intra-prediction modes, and extended intra-prediction modes can include two non-directional prediction modes and 65 extended directional prediction modes. The same numbers of the extended intra prediction modes can be used for a luminance component and a chrominance component, or a different number of the intra prediction modes can be used for each component. For example, 67 extended intra prediction modes may be used for the luminance component, and 35 intra-prediction modes may be used for the chrominance component.
[0291]
[0292] Alternatively, depending on the chrominance format, a different number of intra prediction modes can be used when performing intra prediction. For example, in the case of the 4: 2: 0 format, 67 intra-prediction modes can be used for the luminance component for performing intra prediction and 35 intra-prediction modes can be used for the chrominance component. In the case of the 4: 4: 4 format, 67 intra-prediction modes can be used for both the luminance component and the chrominance component to perform intra prediction.
[0293]
[0294] Alternatively, depending on the size and / or shape of the block, a different number of intra prediction modes can be used to perform intra prediction. That is, depending on the size and / or shape of the PU or CU, 35 intra-prediction modes or 67 intra-prediction modes can be used to perform intra-prediction. For example, when the CU or PU has the size smaller than 64x64 or is asymmetrically partitioned, 35 intra-prediction modes can be used to perform intra prediction. When the size of the CU or PU is equal to or greater than 64x64, 67 intra prediction modes can be used to perform intra prediction. 65 intra-directional prediction modes can be allowed for intra_2Nx2N, and only 35 intra-directional intra-prediction modes can be allowed for intra_NxN.
[0295]
[0296] A size of a block to which extended intra prediction mode is applied can be set differently for each sequence, snapshot, or cut. For example, it is established that the extended intra prediction mode is applied to a block (for example, CU or PU) that is larger than 64x64 in the first cut. On the other hand, it is established that the extended intra prediction mode is applied to a block that is larger than 32x32 in the second cut. The information representing a size of a block to which the extended intra prediction mode is applied can be signaled through units of a sequence, a snapshot, or a cut. For example, the information that indicates the size of the block to which the extended intra prediction mode applies can be defined as 'log2_extended_intra_mode_size_minus4' obtained by taking a logarithm of the block size and then subtracting the whole number 4. For example, if a value of log2_extended_intra_mode_size_minus4 is 0, it can indicate that the extended intra prediction mode can be applied to a block that has a size equal to or greater than 16x16. And if a value of log2_extended_intra_mode_size_minus4 is 1, it can indicate that the extended intra prediction mode can be applied to a block that has a size equal to or greater than 32x32.
[0297]
[0298] As described above, the number of modes can be determined intra prediction considering at least one of: a color component, a chrominance format, and a size or shape of a block. In addition, the number of intra-candidate predictive mode (e.g., the MPM number) used to determine an intra prediction mode of a current block to be encoded / decoded can also be determined according to at least one of a color component. , a color format, and the size or shape of a block. A method of determining an intra prediction mode of a current block to be encoded / decoded and an intra prediction method using the determined intra prediction mode will be described with the drawings.
[0299]
[0300] Figure 10 is a flow diagram briefly illustrating an intra prediction method according to an embodiment of the present invention.
[0301]
[0302] Referring to Figure 10, an intra prediction mode of the current block can be determined in step S1000.
[0303]
[0304] Specifically, the intra prediction mode of the current block can be derived based on a candidate list and an index. At this point, the candidate list contains multiple candidates, and multiple candidates can be determined based on an intra prediction mode of the neighboring block adjacent to the current block. The neighboring block can include at least one of blocks located at the top, the bottom, the left, the right and the corner of the current block. The index can specify one of the multiple candidates from the list of candidates. The candidate specified by the index can be set to the intra prediction mode of the current block.
[0305]
[0306] An intra prediction mode used for intra prediction in the neighboring block can be established as a candidate. Also, an intra prediction mode having similar directionality to that of the intra-prediction mode of the neighboring block can be established as a candidate. At this point, the intra prediction mode having similar directionality can be determined by adding or subtracting a predetermined constant value to or from the intra prediction mode of the neighboring block. The predetermined constant value can be an integer, such as one, two or greater.
[0307]
[0308] The candidate list can additionally include a default mode. The mode by The defect can include at least one of a planar mode, a CC mode, a vertical mode, and a horizontal mode. The default mode can be added adaptively considering the maximum number of candidates that can be included in the list of candidates of the current block.
[0309]
[0310] The maximum number of candidates that can be included in the list of candidates can be three, four, five, six or more. The maximum number of candidates that can be included in the candidate list can be a fixed value preset in the device to encode / decode a video, or it can be determined in a variable manner based on a characteristic of the current block. The characteristic can mean the location / size / shape of the block, the number / type of the intra prediction modes that the block can use, a type of color, a color format, etc. Alternatively, the information indicating the maximum number of candidates that can be included in the candidate list can be signaled separately, and the maximum number of candidates that can be included in the candidate list can be determined in a variable manner using the information. The information indicating the maximum number of candidates can be signaled in at least one of a sequence level, a snapshot level, a cut level, and a block level.
[0311]
[0312] When the extended intra-prediction modes and the predefined intra-prediction modes are used selectively, the intra-prediction modes of the neighboring blocks can be transformed into indices corresponding to the extended intra-prediction modes, or into indices corresponding to the 35 intra-prediction modes, by means of which the candidates can be derived. To transform an index, a predefined table can be used, or an escalation operation can be used based on a predetermined value. At this point, the predefined table can define a mapping relationship between different groups of intra-prediction modes (for example, extended intra-prediction modes and 35 intra-prediction modes).
[0313]
[0314] For example, when the left neighbor block uses the 35 intra prediction modes and the intra prediction mode of the left neighbor block is 10 (a horizontal mode), it can be transformed into an index of 16 corresponding to a horizontal mode in the modes of intra prediction extended.
[0315] Alternatively, when the upper neighboring blocks use the extended intra prediction modes and the intra prediction mode of the upper neighboring blocks has an index of 50 (a vertical mode), it can be transformed into an index of 26 corresponding to a vertical mode in the 35 modes of intra prediction.
[0316]
[0317] Based on the above-described method of determining the intra prediction mode, the intra prediction mode can be derived independently for each of the following components: luminance component and the chrominance component, or the intra prediction mode of the prediction component. Chrominance can be derived depending on the intra prediction mode of the luminance component.
[0318]
[0319] Specifically, the intra prediction mode of the chrominance component can be determined based on the intra prediction mode of the luminance component as shown in the following Table 1.
[0320]
[0321] T l 1
[0322]
[0323]
[0324]
[0325]
[0326] In Table 1, intra_chroma_pred_mode means signaled information to specify the intra prediction mode of the chrominance component, and IntraPredModeY indicates the intra prediction mode of the luminance component.
[0327]
[0328] Referring to Figure 10, a reference sample for intra prediction of the current block can be derived in step S1010.
[0329]
[0330] Specifically, a reference sample for intra prediction can be derived based on a neighbor sample of the current block. The neighboring sample may be a reconstructed sample of the neighboring block, and the reconstructed sample may be a sample reconstructed before a loop filter or reconstructed sample is applied after the loop filter is applied.
[0331]
[0332] A neighbor sample reconstructed before the current block can be used as the reference sample, and a neighboring sample filtered based on a predetermined intra filter can be used as the reference sample. Filtering of neighboring samples using an intra-filter may also be referred to as reference sample smoothing. The intra-filter may include at least one of the first intra-filter applied to multiple neighboring samples located on the same horizontal line and the second intra-filter applied to multiple neighboring samples located on the same vertical line. Depending on the positions of the neighboring samples, one of the first intra-filter and the second intra-filter can be applied selectively, or both intra-filters can be applied. At this time, at least one filter coefficient of the first intra-filter or the second intra-filter can be (1, 2, 1), but is not limited thereto.
[0333]
[0334] The filtering can be performed adaptively based on at least one of the intra prediction mode of the current block and the size of the transform block for the current block. For example, when the intra-prediction mode of the current block is CC mode, vertical mode, or horizontal mode, filtering can not be performed. When the size of the transform block is NxM, filtering can not be performed. At this point, N and M can be the same values or different values, or they can be values of 4, 8, 16 or greater. For example, if the size of the transform block is 4x4, filtering can not be performed. Alternatively, filtering can be performed adaptively based on the result of a comparison of a predefined threshold and the difference between the intra prediction mode of the current block and the vertical mode (or the horizontal mode). For example, when the difference between the intra prediction mode of the current block and the vertical mode is greater than a threshold, filtering can be performed. The threshold can be defined for each size of the transform block as shown in Table 2.
[0335]
[0336] Table 2
[0337]
[0338]
[0339]
[0340]
[0341] The intra-filter can be determined as one of multiple intra-filter candidates predefined in the device to encode / decode a video. For this purpose, an index specifying an intra-filter of the current block among the multiple intra-filter candidates can be signaled. Alternatively, the intra filter can be determined based on at least one of the size / shape of the current block, the size / shape of the transform block, information on the filter intensity, and variations of the neighboring samples.
[0342]
[0343] Referring to Figure 10, an intra prediction can be performed using the intra prediction mode of the current block and the reference sample in step S1020.
[0344]
[0345] That is, the prediction sample of the current block can be obtained using the intra prediction mode determined in step S500 and the reference sample derived in step S510. However, in the case of intra prediction, a border sample of the neighboring block can be used, and therefore the quality of the prediction snapshot can be reduced. Therefore, a correction process can be performed in the prediction sample generated through the prediction process described above, and will be described in detail with reference to Figures 11 to 13. However, the correction process is not limited to which applies only to the intra prediction sample, and can be applied to an inter prediction sample or to the reconstructed sample.
[0346]
[0347] Figure 11 is a diagram illustrating a method of correcting a prediction sample of a current block based on differential information from neighboring samples according to an embodiment of the present invention.
[0348]
[0349] The prediction sample of the current block can be corrected based on the differential information of multiple neighboring samples for the current block. The correction can be made in all prediction samples in the current block, or it can be done in prediction samples in predetermined partial regions. The partial regions may be one row / column or multiple rows / columns, and these may be preset regions for correction in the device to encode / decode a video. For example, correction may be performed in a row / column located in a limit of the current block or may be performed in a plurality of rows / columns from a limit of the current block. As an alternative, the regions partial can be determined in a variable manner based on at least one of the size / shape of the current block and the intra prediction mode.
[0350]
[0351] The neighboring samples can belong to the neighboring blocks located in the upper part, the left and the upper left corner of the current block. The number of neighbor samples used for correction can be two, three, four or more. The positions of the neighboring samples can be determined in a variable manner depending on the position of the prediction sample which is the correction target in the current block. Alternatively, some of the neighboring samples may have fixed positions regardless of the position of the prediction sample that is the correction target, and the remaining neighboring samples may have variable positions depending on the position of the prediction sample that is the target of correction.
[0352]
[0353] The differential information of the neighboring samples can mean a differential sample between the neighboring samples, or it can mean a value obtained by scaling the differential sample by a predetermined constant value (for example, one, two, three, etc.). At this point, the predetermined constant value can be determined by considering the position of the prediction sample that is the correction target, the position of the column or row that includes the prediction sample that is the correction target, the position of the sample of prediction in the column or row, etc.
[0354]
[0355] For example, when the intra-prediction mode of the current block is vertical mode, differential samples can be used between the upper left neighbor sample p (-1, -1) and neighboring samples p (-1, y) adjacent to the left border of the Current block to obtain the final prediction sample as shown in Equation 1.
[0356]
[0357] [Ecuaci
[0358]
[0359]
[0360]
[0361] For example, when the intra-prediction mode of the current block is the horizontal mode, differential samples can be used between the upper left neighbor sample p (-1, -1) and neighboring samples p (x, -1) adjacent to the upper limit of the current block to obtain the final prediction sample as shown in Equation 2.
[0362] [Ecuaci
[0363]
[0364] For example, when the intra-prediction mode of the current block is vertical mode, differential samples can be used between the upper left neighbor sample p (-1, -1) and neighboring samples p (-1, y) adjacent to the left border of the current block to obtain the final prediction sample. At this point, the differential sample can be added to the prediction sample, or the differential sample can be scaled by a predetermined constant value, and then added to the prediction sample. The predetermined constant value used when scaling can be determined differentially depending on the column and / or row. For example, the prediction sample can be corrected as shown in Equation 3 and Equation 4.
[0365]
[0366] [Equation 3]
[0367] P '(0,> 0 = P (0 , y) + (( p ( - 1 > y) -p ( - 1 - 1)) »1 Para = 0 .. .N -1
[0368]
[0369] [Equation
[0370]
[0371]
[0372] For example, when the intra-prediction mode of the current block is the horizontal mode, differential samples can be used between the upper left neighbor sample p (-1, -1) and neighboring samples p (x, -1) adjacent to the upper limit of the Current block to obtain the final prediction sample, as described in the case of vertical mode. For example, the prediction sample can be corrected as shown in Equation 5 and Equation 6.
[0373]
[0374] [Ecuac
[0375]
[0376] [Ecua
[0377]
[0378] Figures 12 and 13 are diagrams illustrating a method of correcting a prediction sample based on a predetermined correction filter according to an embodiment of the present invention.
[0379]
[0380] The prediction sample can be corrected based on the neighbor sample of the prediction sample which is the correction target and a predetermined correction filter. At this point, the neighbor sample can be specified by an angular line of the directional prediction mode of the current block, or it can be at least one sample located on the same angular line as the prediction sample that is the correction target. Also, the neighbor sample can be a prediction sample in the current block, or it can be a reconstructed sample in a neighboring block reconstructed before the current block.
[0381]
[0382] At least one of the number of derivations, intensity, and a filter coefficient of the correction filter can be determined based on at least one of the position of the prediction sample which is the correction objective, if the prediction sample that is the target of correction is located or not in the limit of the current block, the intra prediction mode of the current block, angle of the directional prediction mode, the prediction mode (inter or intra mode) of the neighboring block, and the size / shape of the block current.
[0383]
[0384] Referring to Figure 12, when the directional prediction mode has an index of 2 or 34, at least one predicted / reconstructed sample located in the lower left of the prediction sample which is the correction target and the default correction filter to obtain the final prediction sample. At this point, the predicted / reconstructed sample in the lower left can belong to an earlier line of a line that includes the prediction sample that is the correction target. The predicted / reconstructed sample in the lower left can belong to the same block as the current sample, or to the neighboring block adjacent to the current block.
[0385]
[0386] The filtration for the prediction sample can be done only on the line located at the block boundary, or it can be done on multiple lines. The correction filter where at least one of the number of filter derivations and a filter coefficient can be used is different for each of the lines. For example, a filter (1/2, 1/2) can be used for the first left line closest to the block boundary, a filter can be used (12/16, 4/16) for the second line, a filter (14/16, 2/16) can be used for the third line, and a filter can be used (15/16, 1/16) for the fourth line.
[0387]
[0388] Alternatively, when the directional prediction mode has an index of 3 to 6 or 30 to 33, filtering can be performed at the block boundary as shown in Figure 13, and a 3-lead correction filter can be used to correct the prediction sample. Filtering can be done using the sample from the bottom left of the prediction sample that is the correction target, the sample from the bottom of the sample from the bottom left, and a 3-derivation correction filter that takes as input the prediction sample that is the objective of correction. The neighbor sample position used by the correction filter can be determined differentially based on the directional prediction mode. The filter coefficient of the correction filter can be determined differently depending on the directional prediction mode.
[0389]
[0390] Different correction filters can be applied depending on whether the neighboring block is encoded in the inter mode or the intra mode. When the neighboring block is encoded in the intra mode, a filtering method can be used where more weight is given to the prediction sample, compared to when the neighboring block is encoded in the inter mode. For example, in the case that the intra prediction mode is 34, when the neighboring block is coded in the inter mode, a filter (1/2, 1/2) can be used, and when the neighboring block is coded in the intra mode, a filter can be used (4/16, 12/16).
[0391]
[0392] The number of lines to be filtered in the current block may vary depending on the size / shape of the current block (for example, the code block or the prediction block). For example, when the size of the current block is equal to or less than 32x32, filtering can be performed on only one line in the block boundary; otherwise, filtering can be performed on multiple lines that include the line in the block boundary.
[0393]
[0394] Figures 12 and 13 are based on the case where the intra prediction modes are used in Figure 7, but can be applied in an equal / similar way to the case where the extended intra prediction modes are used.
[0395] Figure 14 shows a range of reference samples for an intra prediction according to an embodiment to which the present invention is applied.
[0396]
[0397] Referring to Figure 14, an intra prediction can be performed using the reference samples P (-1, -1), P (-1, y) (0 <= and <= 2N-1) and P (x, - 1) (0 <= x <= 2N-1) located in a limit of a current block. At this time, filtering is performed selectively on reference samples based on at least one of an intra prediction mode (eg, index, directionality, angle, etc., of the intra prediction mode) of the current block or a size of a transform block related to the current block.
[0398]
[0399] Filtering can be performed on reference samples using a predefined intra filter in an encoder and a decoder. For example, an intra filter with a filter coefficient of (1, 2, 1) or an intra filter with a filter coefficient of (2, 3, 6, 3, 2) can be used to derive final reference samples for its Use in intra prediction.
[0400]
[0401] Alternatively, at least one of a plurality of intra-filter candidates can be selected to perform filtering on reference samples. At this point, the plurality of intra-filter candidates can be differentiated from one another by at least one of a filter intensity, a filter coefficient or a derivation number (eg, a number of filter coefficients, a length of filter). A plurality of intra-filter candidates can be defined in at least one of a sequence, a snapshot, a slice, or a block level. That is, a sequence, a snapshot, a cut, or a block in which the current block is included can use the same plurality of intra-filter candidates.
[0402]
[0403] In the following, for convenience of explanation, it is assumed that a plurality of intra-filter candidates includes a first intra-filter and a second intra-filter. It is assumed that the first intra-filter is a 3-lead filter (1, 2, 1) and the second intra-filter is a 5-lead filter (2, 3, 6, 3, 2).
[0404]
[0405] When reference samples are filtered by applying a first intra-filter, the filtered reference samples can be derived as shown in Equation 7.
[0406] [Equation 7]
[0407] P (- l, - l) = (P (- 1, 0) 2 P (- 1, - 1) P (0, - 1) 2) »2
[0408] P (-1, and and = (P (- 1, v 1) 2 P (- 1 , y) + P ( - one ,Y - 1) 2)>> 2
[0409] P C *, -1) = (P <> 1 1) 2 P (*, - 1) P (* - 1 1) 2) »2
[0410] When reference samples are filtered by applying the second intra-filter, the filtered reference samples can be derived as shown in the following equation 8.
[0411]
[0412] [Equation 8]
[0413] P (- 1 1) = (2 P (- 2, 0) 3 P (- 1, 0) 6 P (- 1 1) 3 P (0, - 1) 2 P (0, - 2) 8) » 4
[0414] P (- 1 ^) = (2 P (- 1, v 2) 3 P (-1,> + 1) 6 P (-1,> 0 3 P (-1,> '-1) + 2 P (-1, v - 2) 8) »4 P (*, - 1) = (2 P (* 2, - 1) 3 P (* 1, -1) 6 P (*, - 1) 3 P ( * - 1, -1) 2 P (* -2, -1) 8) »4
[0415]
[0416] In Equations 7 and 8 above, x can be an integer between 0 and 2N-2, and y can be an integer between 0 and 2N-2.
[0417]
[0418] Alternatively, based on a position of a reference sample, one of a plurality of intra-filter candidates can be determined, and filtering can be performed on the reference sample using the determined one. For example, a first intra-filter can be applied to reference samples included in a first range, and a second intra-filter can be applied to reference samples included in a second interval. At this point, the first interval and the second interval can be distinguished based on whether they are adjacent to a limit of a current block, whether they are located on a top or a left side of a current block, or whether they are adjacent to a corner of a block. a current block. For example, as shown in Figure 15, filtration is performed on the reference samples (P (-1, -1), P (-1.0), P (1.1), ..., P ( -1, N-1) and P (0, -1), P (1, -1), ...) that are adjacent to a limit of the current block by applying a first intra filter as shown in Equation 7, and filtering is performed on the other reference samples that are not adjacent to a limit of the current block by applying a second reference filter as shown in Equation 8. It is possible to select one of a plurality of intra-filter candidates based on a type of transform used for a current block, and perform filtering on reference samples using the selected one. At this point, the type of transform can mean (1) a transform scheme such as DCT, DST or KLT, (2) a transform mode indicator such as a 2D transform, 1D transform or untransformed or (3) the number of transformations such as a first transformed and a second transformed. In the following, for convenience of description, it is assumed that the type of transform means the transform scheme such as DCT, DST and KLT.
[0419]
[0420] For example, if a current block is coded using a DCT, filtering can be performed using a first intra-filter, and if a current block is coded using a DST, filtering can be performed using a second intra-filter. Or, if a current block is coded using DCT or DST, filtering can be performed using a first-intra filter, and if the current block is coded using a KLT, filtering can be performed using a second intra-filter.
[0421]
[0422] Filtration can be performed using a filter selected based on a type of transform of a current block and a position of a reference sample. For example, if a current block is coded using a DCT, filtering can be performed on reference samples P (-1, -1), P (-1.0), P (-1.1), ..., P (-1, N-1) and P (0, -1), P (1, -1), ..., P (N-1, -1) using a first intra-filter, and filtration can be performed in other reference samples using a second-intra filter. If a current block is coded using a DST, filtering can be performed on reference samples P (-1, -1), P (1.0), P (-1.1), ..., P (-1, N-1) and P (0, -1), P (1, -1), ..., P (N-1, -1) using a second intra-filter, and filtering can be performed on other reference samples using a first intra-filter.
[0423]
[0424] One of a plurality of intra-filter candidates can be selected based on whether a transform type of a neighboring block that includes a reference sample is the same as a transform type of a current block, and filtering can be performed using the candidate of intra-filter selected. For example, when a current block and a neighboring block use the same type of transform, filtering is performed using a first intra-filter, and when the types of transform of a current block and a neighboring block are different from each other, it can be used the second intrafilter to perform filtration.
[0425]
[0426] It is possible to select any one of a plurality of intrafilter candidates based on a type of transform from a neighboring block and perform filtering on a reference sample using the selected one. That is, a specific filter can be selected in consideration of a type of transformation of a block in which it is including a reference sample. For example, as shown in Figure 16, if a block adjacent to the left / bottom left of a current block is a block coded using a DCT, and a block adjacent to the top / top right of a current block is an block encoded using a DST, filtration is performed on reference samples adjacent to the left / lower left of a current block by applying a first intra-filter and filtering is carried out on reference samples adjacent to the top / top right part of a current block applying a second intra filter.
[0427]
[0428] In units of a predetermined region, a usable filter can be defined in the corresponding region. In the present document, the unit of the predetermined region may be any one of a sequence, a snapshot, a section, a group of blocks (for example, a row of coding tree units) or a block (for example, a block). code tree unit) or, another region that shares one or more filters can be defined. A reference sample can be filtered using a filter mapped to a region in which a current block is included.
[0429]
[0430] For example, as shown in Figure 17, it is possible to perform filtration on reference samples using different filters in CTU units. In this case, the information indicating whether the same filter is used in a sequence or a snapshot, a filter type used for each CTU, an index specifying a filter used in the corresponding CTU among available intra filter candidates can be signaled by a set of sequence parameters (SPS) or a set of snapshot parameters (PPS).
[0431]
[0432] The intra filter described above can be applied in units of a coding unit. For example, filtering can be performed by applying a first intra-filter or a second intra-filter to reference samples around a coding unit.
[0433]
[0434] When an intra prediction mode of a current block is determined, an intra prediction can be performed using a reference sample adjacent to the current block. For example, prediction samples of a current block can be generated by averaging reference samples, or they can be generated by duplicating reference samples in a specific direction considering a directionality in a way of intra prediction. As described above, in one example, referring to Figure 14, P (-1, -1), P (-1, y) (0 <= and <= 2N-1), P (x, - 1) (0 <= x <= 2N-1) that are located in a limit of a current block can be used as reference samples.
[0435] When it is determined that a sample included in a neighboring block adjacent to a current block is not available as a reference sample, the sample that is not available can be replaced by a reference sample that is available. For example, a neighbor sample can be determined to be unavailable in the case where a position of a sample included in a neighboring block is outside a snapshot, a sample included in a neighboring block is present in a different slice of a current block, or a sample included in a neighboring block is included in a block coded by an inter-prediction. At this point, it can be determined whether or not a sample included in a block coded by an inter-prediction is available based on information indicating whether to use a sample included in a block coded by an inter-prediction as a reference sample when an intra prediction of a current block is performed. At this point, the information can be a 1-bit flag (for example, 'constrained_intra_prediction_flag'), but it is not limited to the same. For example, when a value of 'constrained_intra_prediction_flag' is 1, a sample included in a block coded by an inter-prediction can be determined that it is not available as a reference sample. In the following, a sample that can not be used as a reference sample will be referred to as a non-available reference sample.
[0436]
[0437] In the example shown in Figure 14, when it is determined that a sample located in the lower left part (for example, P (-1, 2N-1)) is not available, the sample located in the lower left part may be replaced by a first available reference sample that is searched first by scanning available samples in a predetermined order. At this point, the scanning order can be performed sequentially from a sample adjacent to the sample on the lower left side. For example, in the example shown in Figure 14, when a sample P (-1, 2N-1) is not available, scanning can be performed in an order of P (-1, -2N-2) to P (-1 , -1), P (-1) to P (2N-1, -1). P (-1, 2N-1) can be replaced by a first available reference sample found as a result of the scan.
[0438] When a left reference sample except for a reference sample located further to the left is not available, the left reference sample may be replaced by a reference sample adjacent to a lower part of the left reference sample. For example, a non-available reference sample P (-1, y) between P (-1, 2N-1) and P (-1, -1) can be replaced by a reference sample P (-1, y + 1 ).
[0439]
[0440] When a higher reference sample is not available, the upper reference sample may be replaced by a reference sample adjacent to the left of the upper reference sample. For example, a non-available reference sample P (x, -1) between P (0, -1) and P (2N-1, -1) can be replaced by a reference sample P (x-1, -1) .
[0441]
[0442] A set of reference samples for a current block can be referred to as a 'reference line' (or 'intra-reference line' or 'reference sample line'). At this point, the reference line may include a set of reference samples composed of a row and a column. For example, in the example shown in Figure 16, an established reference line reference sample including P (-1, 2N-1) to P (-1, 1), P (0, -1) a P (2N-2, -1). An intra-prediction of a current block can be made based on reference samples included in a reference line. An intra-prediction of a current block can be performed, using reference samples included in a reference line, based on an intra-prediction mode of a current block, for example, when an intra-prediction mode of a current block is In a CC mode, a prediction signal can be generated using a weighted average and prediction of reference samples included in the reference line. For example, when an intra-prediction mode of a current block is a CC mode, the prediction samples of the current block can be obtained according to Equation 9.
[0443]
[0444]
[0445]
[0446]
[0447] In Equation 9, dcVal can be generated based on an average value of samples except for P (-1, -1) between reference samples included in a reference line.
[0448]
[0449] A planar mode provides effective prediction efficiency in a smooth area that has no sharp edges, and is effective in improving block boundary discontinuity or image quality deterioration of a block boundary. When an intra-prediction mode of a current block is a planar mode, a provisional prediction sample of horizontal direction of the current block can be obtained by using a reference sample adjacent to a top right corner of the current block and a reference sample having coordinate and identical to the provisional prediction sample of horizontal direction, and a provisional prediction sample of vertical direction of the current block can be obtained by using a reference sample adjacent to a lower left corner of the current block and a reference sample having x coordinate identical to the sample of provisional prediction of vertical direction. For example, a provisional prediction sample of horizontal direction and a sample of provisional prediction of vertical direction of a current block can be obtained according to Equation 10.
[0450]
[0451] [Equation 10]
[0452] Ph (xy)
[0453] Pv (x, y)
[0454]
[0455] A prediction sample of a current block can be generated by adding a provisional prediction sample of horizontal direction and a sample of provisional prediction of vertical direction, and then shifting the result of the sum by a value determined according to a size of a current block . For example, a prediction sample of a current block can be obtained according to Equation 11.
[0456]
[0457] [Equation 11]
[0458] P (x, y) = (Pfcfcy)
[0459]
[0460] An intra prediction of a current block can be made using a plurality of reference lines. The lengths of the plurality of reference lines may be all or part thereof, or they may be set different from one another.
[0461] For example, assuming that a current block has a WxH size, the order reference line k can include p (-k, -k), reference samples located in an identical row ap (-k, -k) (eg , reference samples of p (k + 1, -k) ap (W + H + 2 (k-1), -k) or reference samples of p (-k + 1, -k) ap (2W + 2 (k-1), -k)) and reference samples located in an identical column ap (-k, -k) (for example, reference samples of p (-k, -k + 1) ap (-k, W + H + 2 (k-1)) or reference samples of p (-k, -k + 1) ap (-k, 2H + 2 (k-1))).
[0462]
[0463] Figure 18 exemplifies a plurality of reference sample lines. As in the example shown in Figure 18, when a first reference line adjacent to a limit of a current block is referred to as a 'reference line 0', the order reference line k can be established adjacent to the reference line of order (k-1).
[0464]
[0465] Alternatively, unlike the example shown in Figure 18, it is also possible to configure all reference lines to have the same number of reference samples.
[0466]
[0467] An intra prediction of a current block can be performed by at least one of a plurality of reference lines. A method of performing intra prediction using a plurality of reference lines as described above may be referred to as an 'intra prediction method using an extended reference sample' or an 'extended intra prediction method'. In addition, a plurality of reference lines may be referred to as an 'extended reference line'.
[0468]
[0469] It can be determined whether or not to perform intra prediction using an extended reference line based on information signaled through a bit stream. At this point, the information may be a 1-bit flag, but it is not limited to the same. The information on whether to perform intra prediction using an extended reference line can be signaled in units of a coding tree unit, a coding unit or a prediction unit, or it can be signaled in units of a sequence, a snapshot or a cut. That is, if performing intra prediction using the extended reference line can be determined in units of one sequence, a snapshot, a cut, a CTU, a CU or a PU.
[0470]
[0471] Alternatively, it may be determined whether to perform intra prediction or not using an extended reference line based on at least one of a size, shape, depth or intra prediction mode of a current block.
[0472]
[0473] For example, it can be determined whether to perform intra prediction using an extended reference line, depending on whether a current block has a square shape or a non-square shape. For example, if the current block has the square shape, an intra prediction of the current block can be made using the extended reference line, as in the example shown in Figure 19 (a). That is, when the current block has the square shape, an intra prediction can be made using at least one of a plurality of reference lines around the current block. On the other hand, when the current block has the non-square shape, an intra prediction of the current block can be made without using the extended reference line, as in the example shown in Figure 19 (b). That is, when the current block has the non-square shape, an intra prediction can be made using a reference line adjacent to the current block.
[0474]
[0475] In contrast to the example shown in Figure 19, when the current block has the non-square shape, an intra prediction can be made using an extended reference line, and when the current block has the square shape, an intra prediction can be made without using the Extended reference line.
[0476]
[0477] When determining to perform an intra prediction using an extended reference line, a number of reference lines can be determined. At this point, a number of reference lines can have a fixed value, and can be determined adaptively according to a size, shape or intra prediction mode of a current block. For example, when an intra-prediction mode of a current block is a non-directional mode, an intra-prediction of the current block is performed using a reference line. When an intra prediction mode of a current block is a directional mode, an intra prediction of the current block can be performed using a plurality of reference lines.
[0478]
[0479] For a further example, a number of reference lines can be determined by information that is signaled in units of a sequence, a snapshot, a cut or a unit to be decoded. At this point, the unit to be decoded can represent a coding tree unit, a coding unit, a transform unit, a prediction unit, or the like. For example, a syntax element 'max_intra_line_idx_minus2' may be signaled indicating a number of available reference lines, available in a sequence or a cut through a sequence header or a cutting header. In this case, the number of available reference lines can be set to max_intra_line_idx_minus2 2.
[0480]
[0481] In the following, a method of performing intra prediction using an extended reference line will be described in detail.
[0482]
[0483] Figure 20 is a flowchart illustrating a method of performing intra prediction using an extended reference line in accordance with the present invention.
[0484]
[0485] First, a decoder can generate a plurality of reference lines (S1710). The reference samples included in each reference line can be generated based on reconstructed samples included in decoded blocks earlier than a current block.
[0486]
[0487] When an intra-prediction mode of a current block is a directional mode, a decoder can generate a reference line by considering a directionality of the intra-prediction mode. Considering a directionality of an intra prediction mode, a larger number of reference samples can be included in the order reference line k than in the order reference line (k-1). That is, a reference line away from a current block may include a larger number of reference samples than a reference line near the current block.
[0488]
[0489] At this point, a number of reference samples included additionally in the order reference line k can be determined as in the order reference line (k-1) in a variable manner according to a size, a shape or a mode of intra prediction of a current block.
[0490] For example, when a current block has a size of 4x4, the order reference line k may additionally include four (specifically, 2 in the horizontal direction and 2 in the vertical direction) reference samples as the order reference line (k) one). In addition, when a current block has a size of 8x8, the order reference line k may additionally include eight (specifically, 4 in the horizontal direction and 4 in the vertical direction) reference samples that the order reference line (k) one).
[0491]
[0492] Referring to Figure 18, since a size of a current block size is 4x4, it is exemplified that a first reference sample includes a total of 9 reference samples and a second reference sample includes a total of 13 (= 9 + 2x2) reference samples.
[0493]
[0494] When a current block is non-square, a number of reference samples included in a reference line can be determined according to a horizontal and vertical lengths of a current block.
[0495]
[0496] For an example, Figure 21 is a diagram that exemplifies a plurality of reference lines for a non-square block. Describing in comparison with Figures 18 and 21, as a width of a current block is reduced to 1/2, a number of higher reference samples except for a top left reference sample included in a reference line 0 is reduced from 8 to 4.
[0497]
[0498] That is, according to Figures 15 and 17, when it is assumed that a current block has a size WxH, the reference line of order k can include a total of 2 {(W + H) +2 (k-1) } +1 reference samples including W + H + 2 (k-1) top reference samples (or 2W + 2 (k-1) top reference samples) (ie reference samples from horizontal direction), W + H + 2 (k-1) left reference samples (or 2H + 2 (k-1) left reference samples) (ie vertical direction reference samples) and upper left reference sample.
[0499]
[0500] If a reference sample that is not available is included in a reference line, the unavailable reference sample can be replaced by a neighboring reference sample available. At this time, the neighbor sample that replaces the unavailable reference sample can be included in the same reference line that the reference sample is not available, or can be included in the reference line different from the reference sample not available.
[0501]
[0502] For example, if a position of a reference sample is outside a snapshot or in a different slice of a current block when an intra prediction is made using an extended reference line or if a reference sample is included in a block coded by inter prediction when performing an intra prediction using an extended reference line, the reference sample can be determined as not available. The reference sample included in an inter-predicted coded block may be determined as unavailable when it is established that a reference sample included in an inter-predicted coded block is not used (eg, only when a value of constrained_intra_prediction_flag is 0). Or, if it is established that an intra-predicted coded block should be decoded before an inter-predicted coded block, the inter-predicted coded block may still not have been reconstructed yet when the coded block is decoded by intra-prediction. Accordingly, a reference sample included in the block coded by inter prediction can be determined as not available.
[0503]
[0504] A reference sample used to replace a non-available reference sample can be determined in consideration of a non-available reference sample position, a distance between the unavailable reference sample and the available reference sample, or the like. For example, an unavailable sample can be replaced by an available sample that has a shorter distance from the reference sample not available. That is, an available reference sample that has the shortest distance and is selected by comparing a distance (first displacement) between an available reference sample included in the same reference line with the unavailable reference sample and the unavailable sample and a distance (second displacement) between an available reference sample included in a reference line different from the unavailable reference sample and the unavailable sample can be substituted for the unavailable reference sample. Alternatively, an available reference sample located at a predetermined address of the unavailable reference sample may replace the unavailable reference sample. At this point, the default address can be a predefined address (for example, left, right, up or down) in the encoder / decoder. The predefined address can be set differently depending on a position of the reference sample not available.
[0505]
[0506] In the example shown in Figure 22, it is represented that a distance between the unavailable reference sample included in reference line 0 and the available reference sample included in reference line 0 is 4, and a distance between the sample The unavailable reference included in reference line 0 and the available reference sample included in reference line 2 is 2. Therefore, the unavailable sample included in reference line 0 can be replaced using the available reference sample included in reference line 2.
[0507]
[0508] If a first displacement and a second displacement are equal, a non-available reference sample can be replaced using a reference sample available in the same reference line as the reference sample not available.
[0509]
[0510] An unavailable reference sample can be substituted using an available reference sample included in a reference line different from the reference sample not available only when a distance (ie, a first displacement) between an available sample included in the same line of reference as the unavailable reference sample and the unavailable reference sample is equal to or greater than N. Alternatively, even when the first displacement is equal to or greater than N, an available reference sample included in a different reference line than an unavailable reference sample can be used to replace the reference sample not available only when the second displacement is less than the first displacement. At this point, N can represent an integer of 1 or greater.
[0511]
[0512] If a first offset is not equal to or greater than N, an unavailable reference sample can be replaced using an available reference sample included in the same reference line as the unavailable reference sample.
[0513]
[0514] Figures 23 and 24 show an example in which a non-available reference sample is replaced by a reference sample available when N is 2. If a distance between an unavailable reference sample included in reference line 0 and an available reference sample included in reference line 0 is 2, as in the example shown in Figure 23, the unavailable reference sample included in reference line 0 can be replaced using a reference sample available included in reference line 1.
[0515]
[0516] On the other hand, if a distance between a non-available reference sample included in reference line 0 and an available reference sample included in reference line 0 is 1, as in the example shown in Figure 24, the sample of Unavailable reference included in reference line 0 can be substituted using the available reference sample included in reference line 0.
[0517]
[0518] A non-available reference sample can be substituted using an available reference sample included in the same reference line as the unavailable reference sample or an available reference sample included in a reference line adjacent to a reference line in which includes the reference sample not available. At this point, a reference line adjacent to a reference line in which the unavailable reference sample is included can reference a reference line that has an index difference of 1 from the reference line that includes the sample reference not available. Alternatively, the unavailable reference sample may be replaced by an available reference sample included in a reference line having an index difference of two or more from the reference line that includes the reference sample not available.
[0519]
[0520] Alternatively, a non-available reference sample can be substituted using an available reference sample included in a reference line that has a higher index value or that has a lower index value than a reference line that includes the non-reference sample. available. For example, if a reference line having an index value greater than a reference line including the unavailable reference sample is used, a reference sample located in a left or upper part of the sample can be used. reference not available to replace the reference sample not available.
[0521]
[0522] A search can be performed for an available reference sample to replace a non-available reference sample in a predefined direction. By example, only a reference sample located at an address of either a top, a bottom, a left or a right part of the sample can be used not among reference samples included in the same reference line as the sample reference not available to replace the reference sample not available. Alternatively, only a reference sample located at an address of either an upper, a lower, a left or a right part of the sample not available between reference samples included in a reference line different from the reference line may be used. reference sample not available to replace the unavailable sample.
[0523]
[0524] A decoder can decode, based on a bitstream, index information that specifies at least one of a plurality of reference lines (S1720). For example, when 4 reference lines are available as in the example shown in Figure 18, the index information may specify at least one of the 4 reference lines.
[0525]
[0526] A reference line can be determined to perform intra prediction for a current block adaptively based on a size of a current block, a type of a current block, an intra prediction mode of a current block, index information in a neighboring block or a difference between an intra prediction mode of a current block and a predetermined intra prediction mode, and the like.
[0527]
[0528] In addition, the number of reference lines used for an intra prediction of a current block may have a fixed value or may be determined adaptively according to a size, shape, or intra prediction mode of the current block.
[0529]
[0530] When at least one of a plurality of reference lines is determined, a decoder can perform an intra prediction for a current block using the given reference line (S1730). In this case, a position of a reference sample used in the intra prediction of the current block in the selected reference line may be derived according to at least one of a type of the intra prediction mode or a directionality of the intra prediction mode of the current block.
[0531]
[0532] For example, when an intra prediction mode of a current block is a mode of CC, a prediction sample of the current block can be generated based on an average value (dcVal) of all or a part of the reference samples included in the determined reference line. With reference to Figures 25 and 26, a calculation of the average value of the reference samples included in the reference line will be described in detail.
[0533]
[0534] Alternatively, when an intra-prediction mode of a current block is a directional mode, a prediction sample of the current block can be generated based on a reference sample specified by the directional mode between reference samples included in the given reference line. At this time, if a line segment that extends from a prediction sample to the direction indicated by the directional mode points between reference samples, the prediction sample of the current block can be generated based on a weighted sum (weighted prediction) of a first reference sample and a second reference sample that are located on both sides of the point indicated by the line segment extending to the direction indicated by the directional mode.
[0535]
[0536] When an intra-prediction mode of a current block is CC mode, there is a need to calculate an average value (dcVal) of reference samples included in a reference line to perform prediction in the current block. At this time, the average value for the reference samples in the order reference line k can be calculated using only a part of the reference samples included in the reference line of order k. At this time, the number of reference samples used to derive the average value can be the same for each reference line, or it can be different for each reference line.
[0537]
[0538] Alternatively, an average value can be derived for reference samples on the order reference line k using all the reference samples included in the order reference line k. Alternatively, it can be determined based on a size of a current block, a shape of a current block, or a position of a reference line if deriving an average value using a part of reference samples in the order reference line or derivative an average value of all the reference samples in the reference line of order k.
[0539]
[0540] Figure 25 is a diagram illustrating reference samples used to derive an average value of a reference line.
[0541]
[0542] Figure 25 shows an example of derivation of an average reference sample value from the order reference line k using a part of reference samples included in a reference line. For example, an example illustrated in Figure 25, an average value of the reference sample of a first reference line adjacent to a current block (i.e., the reference line 0 shown in Figure 25) can be calculated using samples from upper reference and left reference samples excluding a reference sample adjacent to a higher left corner of the current block. That is, when a current block size is NxN, a total of 4N reference samples such as 2N upper reference samples and 2N left reference samples can be used for the calculation of the average value of the first reference line.
[0543]
[0544] The number of reference samples used to calculate an average reference sample value of the order reference line k may be the same as the number of reference samples used to calculate an average reference sample value of the first line of reference. reference. At this time, a position of a reference sample used to calculate the average value of the order reference line k may correspond to a position of a reference sample used to calculate the average value of the reference sample of the first line of reference. reference.
[0545]
[0546] A reference sample on the reference line of order k corresponding to a reference sample of a first reference line may have the same x coordinate or the same y coordinate as the reference sample of the first reference line. For example, a coordinate of a top reference sample included in the reference line of order k corresponding to a top reference sample P (i, j) included in a first reference line may be P (i, j-k) +1) that has the same x coordinate as P (i, j). For example, a coordinate of a left reference sample on the reference line of order k corresponding to a left reference sample P (i, j) included in a first reference line may be P (i-k + 1, j) that has the same coordinate and that P (i, j).
[0547]
[0548] In Figure 25, reference samples of the second to fourth lines of reference are shown reference that correspond to a superior reference sample and left reference sample in a first reference line. An average reference sample value of each reference line can be calculated using the reference samples shown in Figure 25.
[0549] In Figure 25, it is assumed that a current block has a square shape, but even if the current block has a non-square shape, the previous embodiment can be applied as it is. For example, when the current one is a non-square block that has WxH size, an average reference sample value of each reference line can be calculated using a total of 2 (W + H) reference samples, such as 2W reference samples upper and 2H left reference samples. Therefore, as in the example shown in Figure 26, the number of reference samples used to calculate an average value of the order reference line k can have the same value as the number of reference samples used to calculate a value average of the first reference line. Also, the location of the reference sample used to calculate the average value of the reference line of order k may correspond to the location of the reference sample used to calculate the average value of the reference sample of the first reference line .
[0550]
[0551] In Figures 25 and 26, as many top reference samples as twice a width of a current block and left reference samples as many as twice a height of the current block are used to calculate an average reference sample value of a line of reference. reference. An average reference sample value of a reference line can be calculated using a smaller or larger number of reference samples than those shown in Figures 25 and 26. For example, the average reference sample value of the reference line can be calculated using the same number of reference samples higher than the width of the current block and the same number of reference samples left as the height of the current block.
[0552]
[0553] An average reference sample value of a reference line can be calculated by assigning different weights to reference samples, depending on a form of a current block and a position of a reference sample. For example, if the current block has a square shape, the average reference sample value can be calculated by assigning the same weight to reference samples superiors and left reference samples. On the other hand, when the current block has a non-square shape, the average value of the reference sample can be calculated by assigning a greater weight to one of the higher reference samples and left reference samples. For example, if a height of the current block is greater than a width, the average value can be calculated by assigning a higher weight to the higher reference samples than to the left reference samples. On the other hand, when the width of the current block is greater than the height, the average value can be calculated by assigning a larger weight to the left reference samples than to the higher reference samples.
[0554]
[0555] For example, when the size of the current block is N / 2 * N, the average value of the reference line of order k dcVal can be calculated by the following Equation 12.
[0556]
[0557] [Equation 12]
[0558] two N - one 2N - one
[0559] dc V = ( Y ¿P ( - k J))> 2 N ( Y i 2 XP ( l, - k))> 2 N
[0560] 1 = 0 1 = 0
[0561]
[0562] For example, when the size of the current block is NxN / 2, the average value of the reference line of order k dcVal can be calculated by the following Equation 13.
[0563]
[0564] [Equation 13]
[0565]
[0566]
[0567]
[0568]
[0569] In Equations 12 and 13, k can be set to a value between 1 and max_intra_line_idx_minus2 2.
[0570]
[0571] As in the previous example, the average value can be calculated using reference samples that correspond to reference samples included in the first intra-reference line between reference samples of the intra-reference line of order k. At this time, the average value can be calculated based on a predetermined weight. At this point, the weight can be derived based on a distance of the first intra-reference line and the one of order k from the current block.
[0572] In the example described through Figure 20, it is exemplified that the index information specifying one of the plurality of reference lines is decoded after generating a plurality of reference lines. It is also possible to obtain only one reference line specified by index information among a plurality of reference lines after decoding the index information specifying one of the plurality of reference lines.
[0573]
[0574] In the embodiment described through Figure 20, it is described that the intra prediction for a current block is performed using at least one reference line specified by index information among a plurality of reference lines. That is, the intra prediction can be performed for a current block using a reference line or two or more reference lines. Whether or not to use two or more reference lines when performing the intra prediction for a current block can be determined based on information signaled from a bit stream, a size of a current block, a type of a current block, an intra prediction mode of a current block, if an intra-prediction mode of a current block is a non-directional mode or a difference between an intra-prediction mode of a current block and a predetermined intra-prediction mode and the like.
[0575]
[0576] The two or more reference lines may be specified by a plurality of index information signaled from a bit stream. For example, when two reference lines are set to be used, any one of the two reference lines can be specified by first index information, and the other can be specified by second index information.
[0577]
[0578] Alternatively, two or more reference lines may be spatially contiguous. In this case, index information may be signaled to specify any one of the two or more reference lines through a bit stream. If any one of the two or more reference lines is selected by the index information, the remaining reference line can be automatically selected based on the spatial adjacency with the selected reference line. For example, when it is established that two reference lines are used, and the index information indicates 'reference line 0,' then an intra prediction of a current block can be made based on the reference line 0 and the reference line 1 neighboring reference line 0.
[0579] When it is established that a plurality of reference lines are used, the intra prediction of a current block can be performed based on an average value, a maximum value, a minimum value or a weighted sum of reference samples included in the plurality of lines of reference. reference.
[0580]
[0581] For example, assuming that an intra-prediction mode of a current block is a directional mode (ie, an angular mode), a predicted sample of the current block can be generated based on a first reference sample and a second reference sample, each of which is included in a difference reference line. At this point, a first reference line that includes the first reference sample and a second reference line that includes the second reference sample can be positioned adjacent to each other, although not limited to the same. In addition, the first reference sample and the second reference sample can be determined by an intra prediction mode of the current block. The first reference sample and the second reference sample can be located next to each other, although it is not limited to the same. A prediction sample of a current block can be generated in consideration of a weighted sum of the first reference sample and the second reference sample, or it can be generated based on an average value, a minimum value or a maximum value of the first sample of reference and the second reference sample.
[0582]
[0583] The intra prediction of a current block can be performed by making a first intra prediction based in part on a plurality of reference lines and performing a second intra prediction based on the remaining reference lines. At this point, an intra prediction mode used in a first intra prediction and an intra prediction mode used in a second intra prediction may be the same or different. A prediction sample of a current block can be generated based on a first prediction sample generated by performing a first intra prediction and a second prediction sample performing a second intra prediction.
[0584]
[0585] Smoothing of reference sample can be performed on reference samples included in a reference line. That is, at least one of a plurality of filters can be used to filter the reference samples included in the line of reference. Intra prediction of the current block can be made based on the unfiltered reference sample or the filtered reference sample.
[0586]
[0587] The reference sample smoothing can be performed in all of a plurality of reference lines or in a part of a plurality of reference lines. For example, reference sample smoothing can be performed on a reference line that is used by intra prediction of the current block among a plurality of reference lines, for example, a reference line specified by index information.
[0588]
[0589] It can be determined adaptively based on at least one of a size of a current block, a type of an intra prediction mode, a directionality of an intra prediction mode, a position of a reference line, a number of reference lines or a variation between reference lines if performing reference sample smoothing. The variation between reference lines can represent a value of difference between reference samples included in different reference lines. For example, if the size of the prediction block for the current block is 4x4, or if the intra prediction mode of the current block is the CC mode, the smoothing of the reference sample can be omitted.
[0590]
[0591] Furthermore, the number of times in which a filter or a type of a filter is applied can be determined adaptively depending on at least one of a size of a current block, a type of an intra prediction mode, a directionality of a intra prediction mode, a position of a reference line, a number of reference lines, or a variation between reference lines. For example, when the size of a prediction block related to a current block is equal to or less than 32x32 and the intra prediction mode of the current block does not have a horizontal direction, similar to the horizontal direction, a vertical direction, or similar to the vertical direction, the reference filter smoothing can be done using a first intra filter. On the other hand, when the size of the prediction block related to the current block is equal to or greater than 32x32 and a variation between reference samples is equal to or less than a predetermined value (i.e., a change of values of the reference samples) it is not large), the reference sample smoothing can be done using a second intra-filter.
[0592] When reference samples included in a reference line are filtered using the first intra-filter, a filtered reference sample can be derived as shown in Equation 14.
[0593]
[0594] [Equation 14]
[0595] P (- 1 1) = CP (-1,0) +2 * P (-1 1) + P (0, -1) +2) »2
[0596]
[0597] P (-1 or 0 = (P (-1, .v + 1) +2 * P (-1, y) + P (-1, .v-1) +2)> 2
[0598] P (jc, - 1) = (P (jc + 1 1) + 2 * P (.t, - 1) + P (x-1 1) +2)> 2
[0599]
[0600] When reference samples included in a reference line are filtered using the second intra-filter, a filtered reference sample can be derived as shown in Equation 15.
[0601]
[0602] [Equation 15]
[0603] P (- 1 , y) = ( (2. Y - y) * P (- 1, - 1) (> 1) * P (- 1 , 2.V i 2 A '- 1 ) N / 2') > N
[0604]
[0605] P ( x, ~ 1 ) = ((2 AT - *) * P (- 1, - 1) <> 1 ) * Í> (2 JV 2 A ^ - 1, -1 ) AV 2)> A 7
[0606]
[0607] In the above equations 14 and 15, x can have a value between 0 and 2N-2 (k-1), and y can have a value between 0 and 2N-2 (k-1). At this point, k represents an index of a reference line, and N represents a size of a current block.
[0608]
[0609] Alternatively, a type of an intra-filter or the number of times in which an intra-filter is applied can be determined in a variable manner according to a reference line. For example, different intra filters can be applied depending on an index or a position of a reference line. Or different intra filters can be applied depending on a group to which a reference line belongs. At this point, the different filters may be different from each other on at least one of a filter length, a filter coefficient, or a filter intensity.
[0610]
[0611] As an example, a plurality of reference lines can be classified into at least one group. At this time, each group can include at least one reference line. The grouping can be performed based on at least one of indexes of reference lines, a number of reference lines, or adjacency between reference lines. For example, the plurality of reference lines can be classified into at least one group based on factors such as whether the index of the reference line is an even number or whether the index of the reference line is equal to or greater than a predetermined value.
[0612]
[0613] For example, when a current block uses at least one of a first reference line or a second reference line, intra-reference smoothing can be performed using a first intra-filter. On the other hand, when the current block uses at least one of a third reference line or a fourth reference line, intra-reference smoothing can be performed using a second intra-filter. At this point, the first intra-filter and the second intra-filter may be different from each other in at least one of a filter coefficient, a filter bypass or a filter intensity. For example, the filter coefficients of the first intra filter can be (1, 2, 1) and the filter coefficients of the second intra filter can be (2, 12, 2).
[0614]
[0615] A filter type to be applied to a reference line can be determined based on at least one of a size of a current block, a type of an intra prediction mode, a directionality of an intra prediction mode, a position of the line of reference, the number of reference lines. And one of the filters included in the given type of filter can be applied to the reference line based on the items listed. At this point, the type of filter can be classified according to at least one of a filter length (number of derivations), a filter coefficient or a filter intensity. For example, filters of the first type may have the same filter length with each other, but may have a different filter length than filters of the second type.
[0616]
[0617] For example, when a size of a prediction block related to a current block is equal to or less than 32 ^ 32 and an intra prediction mode of the current block does not have a horizontal direction, an address similar to the horizontal direction can be determined, a vertical direction, or an address similar to the vertical direction, to use the first type of filter. And, when the current block uses at least one of a first reference line or a second reference line, reference sample smoothing can be performed using a first intra-filter included in the first intra-filter type. On the other hand, when the current block uses at least one of a third reference line or a fourth reference line, reference sample smoothing can be performed using a second intra filter included in the first type of intra filter. At this time, the filter lengths of the first intra-filter and the second intra-filter are equal while the filter coefficients are different. For example, the filter coefficient of the first intra filter can be (1, 2, 1) and the filter coefficient of the second intra filter can be (2, 12, 2).
[0618] The number of intra prediction modes available can be determined in a variable manner depending on whether the extended reference line is used or not. That is, depending on whether the extended reference line is used or not, a different number of directional intra prediction modes may be used in units of a sequence, cut, an encoding tree unit, a coding unit, or a unit of prediction.
[0619]
[0620] Since an intra prediction efficiency is increased when the extended reference line is used, there is no problem in performing an effective intra prediction even when a smaller number of the intra prediction modes are used than when the extended reference line is not used . Therefore, depending on whether the extended reference line is used or not, it can be determined whether to use N or less than N directional prediction modes. For example, it may be established that base intra prediction modes (ie 33 directional intra prediction modes) are used when using the extended reference line and that extended intra prediction modes are used (ie, 65 intra-prediction modes). Directional prediction) when the extended reference line is not used.
[0621]
[0622] A type or number of the intra prediction modes available for the current block can be limited according to a position of a reference line used for intra prediction.
[0623]
[0624] For example, as a distance between a current block and a reference line increases, the discontinuity between the current block and the reference line increases. Accordingly, as the distance between the current block and the reference line increases, the efficiency of the intra prediction is reduced using a non-directional prediction mode such as CC mode or planar mode. Accordingly, it can be established not to use non-directional prediction mode that includes at least one of CC mode or planar mode when a reference line having a distance from the current block equal to or greater than a predetermined threshold value is used. For example, when an index of the reference line used to an intra prediction of the current block is equal to or greater than L, the non-directional prediction mode that includes at least one of CC mode and planar mode can not be used. At this point, L is an integer that includes 0, and can be 0, 1, 2, 3, and so on.
[0625]
[0626] Alternatively, the number of available intra prediction modes can be adjusted according to a position of an intra reference line used for an intra prediction of a current block. For example, when an index of a reference line used for an intra prediction of the current block is equal to or greater than L, the intra-prediction modes of the base can be used, and when an index of a reference line is less than L, extended intra prediction modes can be used. For example, if L is 2, the extended intra prediction modes (ie, 67 intra prediction modes) can be used for the first reference line or the second reference line, and the base intra prediction modes can be used ( that is, 35 intra prediction modes) for the third reference line or the fourth reference line.
[0627]
[0628] Depending on an intra-prediction mode of a current block or the number of intra-prediction modes available for the current block, a reference line that is available to be selected for the current block may be limited. For example, when the intra prediction mode of the current block is a non-directional prediction mode such as CC mode or planar mode, it can be established that a reference line having an index equal to or greater than L is not used for an intra-domain mode. prediction of the current block.
[0629]
[0630] The above embodiments have been described mainly in the decoding process, the coding process can be performed in the same order as described or in reverse order.
[0631]
[0632] Figure 27 is a flow chart illustrating processes for obtaining a residual sample according to an embodiment to which the present invention is applied.
[0633]
[0634] First, a residual coefficient of a current block S2710 can be obtained. A decoder can obtain a residual coefficient through a method of coefficient exploration. For example, the decoder can perform a coefficient scan using a zigzag scan, a vertical scan, or a horizontal scan, and can obtain residual coefficients in a two-dimensional block form.
[0635]
[0636] Inverse quantization can be performed on the residual coefficient of the current block S2720.
[0637]
[0638] It is possible to determine whether to omit a reverse transform in the dequantized residual coefficient of the current block S2730. Specifically, the decoder can determine whether to omit the inverse transform into at least one of a horizontal direction or a vertical direction of the current block. When it is determined to apply the inverse transform to at least one of the horizontal direction or vertical direction of the current block, a residual sample of the current block can be obtained by transforming the unquantified residual coefficient of the current block in reverse. At this point, the inverse transform can be performed using at least one of DCT, DST, and KLT.
[0639]
[0640] When the inverse transform is omitted in both the horizontal direction and the vertical direction of the current block, no inverse transformation is made in the horizontal direction and the vertical direction of the current block. In this case, the residual sample of the current block can be obtained by scaling the dequantized residual coefficient with a predetermined value.
[0641]
[0642] Bypassing the inverse transform in the horizontal direction means that the inverse transform is not performed in the horizontal direction but the inverse transform is performed in the vertical direction. At this time, scaling can be done in the horizontal direction.
[0643]
[0644] Bypassing the inverse transform in the vertical direction means that the inverse transform is not made in the vertical direction but that the inverse transform is done in the horizontal direction. At this time, scaling can be made in the vertical direction.
[0645]
[0646] It can be determined whether a transform omission technique can be used or not reverse for the current block depending on a partition type of the current block. For example, if the current block is generated through a binary tree-based partitioning, the inverse transform skip scheme for the current block can be restricted. Therefore, when the current block is generated through partitioning based on a binary tree, the residual sample of the current block can be obtained by inverse transformation of the current block. In addition, when the current block is generated through binary tree-based partitioning, the encoding / decoding of information indicating whether or not the reverse transform is omitted (eg, transform_skip_flag) can be omitted.
[0647]
[0648] Alternatively, when the current block is generated through partitioning based on a binary tree, it is possible to limit the inverse transform omission scheme to at least one of the horizontal direction or the vertical direction. At this point, the direction in which the inverse transform omission scheme is limited can be determined based on decoded information from the bitstream, or can be determined adaptively based on at least one of a current block size, one way of the current block, or an intra prediction mode of the current block.
[0649]
[0650] For example, when the current block is a non-square block that has a width greater than a height, the inverse transform omission scheme can be allowed only in the vertical direction and restricted in the horizontal direction. That is, when the current block is 2NxN, the inverse transform is performed in the horizontal direction of the current block, and the inverse transform in the vertical direction can be performed selectively.
[0651]
[0652] On the other hand, when the current block is a non-square block having a height greater than a width, the inverse transform omission scheme can be allowed only in the horizontal direction and restricted in the vertical direction. That is, when the current block is Nx2N, the inverse transformation is performed in the vertical direction of the current block, and the inverse transform in the horizontal direction can be performed selectively.
[0653]
[0654] In contrast to the previous example, when the current block is a non-square block that has a width greater than a height, the omission scheme can be allowed of inverse transform only in the horizontal direction, and when the current block is a non-square block having a height greater than a width, the inverse transform omitting scheme can be allowed only in the vertical direction.
[0655]
[0656] The information that indicates whether or not to omit the inverse transform with respect to the horizontal direction or the information indicating whether to omit the inverse transformation with respect to the vertical direction can be signaled through a bit stream. For example, the information that indicates whether or not to omit the inverse transform in the horizontal direction is a 1-bit flag, 'hor_transform_skip_flag', and the information that indicates whether to omit the inverse transform in the vertical direction is a 1-bit flag, 'ver_transform_skip_flag'. The encoder can encode at least one of 'hor_transform_skip_flag' or 'ver_transform_skip_flag' according to the shape of the current block. In addition, the decoder can determine whether or not to omit the inverse transform in the horizontal direction or in the vertical direction by using at least one of "hor_transform_skip_flag" or "ver_transform_skip_flag".
[0657]
[0658] It can be set to omit the inverse transform for any address of the current block depending on a partition type of the current block. For example, if the current block is generated through a partitioning based on a binary tree, the inverse transform in the horizontal direction or vertical direction can be omitted. That is, if the current block is generated by binary tree-based partitioning, it can be determined that the inverse transform for the current block is omitted in at least one of a horizontal direction or a vertical direction without encoding / decoding information (e.g., transform_skip_flag, hor_transform_skip_flag, ver_transform_skip_flag) that indicates whether or not the reverse transformation of the current block is omitted.
[0659]
[0660] Although the above-described embodiments have been described based on a series of stages or flowcharts, they do not limit the order of time series of the invention, and may be performed simultaneously or in different orders as necessary. In addition, each of the components (e.g., units, modules, etc.) that constitute the block diagram in the embodiments described above can be implemented by a hardware or software device, and a plurality of components. Or a plurality of components can be combined and implemented through a single hardware or software device. The above-described embodiments can be implemented in the form of program instructions that can be executed through various computer components and recorded on a computer-readable recording medium. The computer readable recording medium may include one or a combination of program commands, data files, data structures and the like. Examples of computer readable media include magnetic media such as hard disks, floppy disks and magnetic tape, optical recording media such as CD-ROM and DVD, magneto-optical media such as optical floppy disks, media, and hardware devices specifically configured to store and execute program instructions such as ROM, RAM, flash memory and the like. The hardware device can be configured to operate as one or more software modules to perform the process according to the present invention and vice versa.
[0661]
[0662] Industrial applicability
[0663]
[0664] The present invention can be applied to electronic devices that can encode / decode a video.
权利要求:
Claims (15)
[1]
1. A method to decode a video, comprising the method:
deriving a plurality of reference sample lines for a current block; selecting at least one among the plurality of reference sample lines; determine whether to apply an intra-filter to a reference sample included in the selected reference sample line;
selectively apply the intra-filter to the reference sample according to the determination; Y
perform an intra prediction for the current block using the reference sample.
[2]
The method of claim 1, wherein if applying the intra-filter is determined based on a current block size, an intra-prediction mode of the current block or a position of the selected reference sample.
[3]
The method of claim 1, wherein a type of intra filter is determined based on a current block size, an intra prediction mode of the current block or a position of the selected reference sample.
[4]
The method of claim 1, wherein the plurality of reference sample lines are classified into a plurality of groups, and a type of intra filter is determined according to a group in which the sample line is included of selected reference.
[5]
The method of claim 1, wherein a number of the intra prediction modes available for the current block is determined adaptively based on a position of the selected reference sample line.
[6]
The method of claim 1, wherein if the current block is available to use a non-directional intra prediction mode it is determined based on a position of the selected reference sample line.
[7]
The method of claim 1, wherein selecting at least one among the plurality of reference sample lines is performed based on an intra prediction mode of the current block or a number of intra prediction modes available for the current block.
[8]
8. A method for encoding a video, comprising the method:
deriving a plurality of reference sample lines for a current block; selecting at least one line between the plurality of reference sample lines; determine whether to apply an intra-filter to a reference sample included in the selected reference sample line;
selectively apply the intra-filter to the reference sample according to the determination; Y
perform an intra prediction for the current block using the reference sample.
[9]
The method of claim 8, wherein if applying the intra-filter is determined based on a current block size, an intra-prediction mode of the current block or a position of the selected reference sample.
[10]
The method of claim 8, wherein a type of the intra filter is determined based on a current block size, an intra prediction mode of the current block or a position of the selected reference sample.
[11]
The method of claim 8, wherein the plurality of reference sample lines are classified into a plurality of groups, and an intra filter type is determined according to a group in which the sample line is included of selected reference.
[12]
The method of claim 8, wherein a number of intra prediction modes available for the current block is determined adaptively based on a position of the selected reference sample line.
[13]
The method of claim 8, wherein if the current block is available to use a non-directional intra prediction mode it is determined based on a position of the selected reference sample line.
[14]
The method of claim 8, wherein selecting at least one among the plurality of reference sample lines is performed based on an intra prediction mode of the current block or an intra prediction mode number available for the current block.
[15]
fifteen. An apparatus for decoding a video, the apparatus comprising:
an intra prediction unit for deriving a plurality of reference sample lines for a current block, to select at least one among the plurality of reference sample lines, to determine whether to apply an intra-filter to a reference sample included in the selected reference sample line, to selectively apply the intra-filter to the reference sample according to the determination, and to perform an intra-prediction for the current block using the reference sample.
类似技术:
公开号 | 公开日 | 专利标题
ES2699691A2|2019-02-12|Video signal processing method and device
ES2703607B2|2021-05-13|Method and apparatus for processing video signals
ES2699723B2|2020-10-16|METHOD AND APPARATUS TO TREAT A VIDEO SIGNAL
ES2739668B1|2021-12-03|METHOD AND APPARATUS FOR PROCESSING VIDEO SIGNALS
ES2692864B1|2019-10-21|METHOD AND APPARATUS FOR PROCESSING VIDEO SIGNS
ES2688624A2|2018-11-05|Method and apparatus for processing video signal
ES2710234B1|2020-03-09|Procedure and device for processing video signals
ES2737874B2|2020-10-16|METHOD AND APPARATUS FOR PROCESSING VIDEO SIGNAL
ES2677193B1|2019-06-19|Procedure and device to process video signals
KR20180051424A|2018-05-16|Method and apparatus for processing a video signal
ES2711474A2|2019-05-03|Method and device for processing video signal
ES2699749B2|2020-07-06|Method and apparatus for processing a video signal
ES2737845B2|2021-05-19|METHOD AND APPARATUS TO PROCESS VIDEO SIGNAL
ES2711223A2|2019-04-30|Method and device for processing video signal
ES2703458A2|2019-03-08|Video signal processing method and device
ES2711230A2|2019-04-30|Method and apparatus for processing video signal
ES2711473A2|2019-05-03|Method and apparatus for processing video signal
CA3065922A1|2019-03-14|Method and device for processing video signal
ES2711209A2|2019-04-30|Method and device for processing video signal
同族专利:
公开号 | 公开日
EP3477951A4|2020-02-19|
US20200329234A1|2020-10-15|
CN109417628A|2019-03-01|
US20210105460A1|2021-04-08|
EP3477951A1|2019-05-01|
ES2724570A2|2019-09-12|
ES2699691R1|2019-04-05|
US20190238835A1|2019-08-01|
US20210105461A1|2021-04-08|
KR20180001479A|2018-01-04|
CN109417628B|2022-03-08|
US20210105459A1|2021-04-08|
EP3477951B1|2021-12-08|
ES2724570R1|2020-04-08|
WO2017222326A1|2017-12-28|
US10735720B2|2020-08-04|
引用文献:
公开号 | 申请日 | 公开日 | 申请人 | 专利标题

US8472522B2|2007-02-23|2013-06-25|Nippon Telegraph And Telephone Corporation|Video encoding method and decoding method, apparatuses therefor, programs therefor, and storage media which store the programs|
KR101663762B1|2010-07-20|2016-10-07|에스케이 텔레콤주식회사|Competition-Based Intra Prediction Coding/Decoding Apparatus and Method Using Multiple Prediction Filters|
KR20120012385A|2010-07-31|2012-02-09|오수미|Intra prediction coding apparatus|
CA3082413C|2011-04-25|2022-01-25|Lg Electronics Inc.|Intra-prediction method, and video encoder and decoder using same|
WO2014107073A1|2013-01-04|2014-07-10|삼성전자 주식회사|Method and apparatus for encoding video, and method and apparatus for decoding said video|
US10602155B2|2013-04-29|2020-03-24|Intellectual Discovery Co., Ltd.|Intra prediction method and apparatus|
US9906790B2|2014-03-14|2018-02-27|Qualcomm Incorporated|Deblock filtering using pixel distance|
WO2017190288A1|2016-05-04|2017-11-09|Microsoft Technology Licensing, Llc|Intra-picture prediction using non-adjacent reference lines of sample values|CN109479142A|2016-04-29|2019-03-15|世宗大学校产学协力团|Method and apparatus for being encoded/decoded to picture signal|
WO2018030599A1|2016-08-08|2018-02-15|엘지전자|Intra-prediction mode-based image processing method and device therefor|
EP3552393A1|2016-12-23|2019-10-16|Huawei Technologies Co., Ltd.|An encoding apparatus for signaling an extension directional intra-prediction mode within a set of directional intra-prediction modes|
US11184609B2|2017-01-02|2021-11-23|Electronics And Telecommunications Research Institute|Image encoding/decoding method, apparatus, and recording medium for storing bitstream|
WO2018216862A1|2017-05-24|2018-11-29|엘지전자 주식회사|Method and device for decoding image according to intra prediction in image coding system|
US10432929B2|2018-02-12|2019-10-01|Tencent America LLC|Method and apparatus for multiple line intra prediction in video compression|
EP3764645A4|2018-03-09|2021-12-08|Electronics and Telecommunications Research Institute|Image encoding/decoding method and apparatus using sample filtering|
US10419754B1|2018-04-02|2019-09-17|Tencent America LLC|Method and apparatus for video decoding using multiple line intra prediction|
WO2019198984A1|2018-04-11|2019-10-17|엘지전자 주식회사|Image coding method based on linear interpolation intra prediction and device therefor|
KR20210016053A|2018-06-25|2021-02-10|김기백|Video encoding/decoding method and apparatus|
US11159806B2|2018-06-28|2021-10-26|Qualcomm Incorporated|Position dependent intra prediction combination with multiple reference lines for intra prediction|
US10567752B2|2018-07-02|2020-02-18|Tencent America LLC|Method and apparatus for intra prediction for non-square blocks in video compression|
US10819977B2|2018-07-05|2020-10-27|Tencent America LLC|Methods and apparatus for multiple line intra prediction in video compression|
KR20200028856A|2018-09-07|2020-03-17|김기백|A method and an apparatus for encoding/decoding video using intra prediction|
AU2019336894A1|2018-09-07|2021-05-06|B1 Institute Of Image Technology, Inc.|Method and device for coding/decoding image using intra prediction|
US10834393B2|2018-09-10|2020-11-10|Tencent America LLC|Intra interpolation filter for multi-line intra prediction|
US10958932B2|2018-09-12|2021-03-23|Qualcomm Incorporated|Inter-prediction coding of video data using generated motion vector predictor list including non-adjacent blocks|
KR20200033195A|2018-09-19|2020-03-27|한국전자통신연구원|Method and apparatus for image encoding/decoding and recording medium for storing bitstream|
EP3868094A4|2018-11-22|2022-02-23|Beijing Bytedance Network Tech Co Ltd|Pulse code modulation technique in video processing|
WO2020130629A1|2018-12-18|2020-06-25|엘지전자 주식회사|Image coding method based on multiple reference line intra prediction, and device therefor|
WO2020130628A1|2018-12-18|2020-06-25|엘지전자 주식회사|Method for coding image on basis of multiple reference line intra prediction and apparatus therefor|
CN109803145A|2018-12-29|2019-05-24|浙江大华技术股份有限公司|Intra-frame prediction method, device, encoder and storage device|
KR20210113390A|2019-04-27|2021-09-15|후아웨이 테크놀러지 컴퍼니 리미티드|Encoders, decoders and corresponding methods of intra prediction|
WO2020256506A1|2019-06-20|2020-12-24|엘지전자 주식회사|Video encoding/decoding method and apparatus using multiple reference line intra-prediction, and method for transmitting bitstream|
CN113347426A|2019-06-21|2021-09-03|杭州海康威视数字技术股份有限公司|Encoding and decoding method, device, equipment and storage medium|
WO2021142363A1|2020-01-09|2021-07-15|Bytedance Inc.|Decoding order of different sei messages|
US20210235071A1|2020-01-23|2021-07-29|Tencent America LLC|Video coding method and system|
US20210289213A1|2020-03-12|2021-09-16|Alibaba Group Holding Limited|Method and apparatus for tile and slicing mapping|
CN111654696A|2020-04-24|2020-09-11|北京大学|Intra-frame multi-reference-line prediction method and device, storage medium and terminal|
法律状态:
2019-02-12| BA2A| Patent application published|Ref document number: 2699691 Country of ref document: ES Kind code of ref document: A2 Effective date: 20190212 |
2019-04-05| EC2A| Search report published|Ref document number: 2699691 Country of ref document: ES Kind code of ref document: R1 Effective date: 20190329 |
2021-06-15| FC2A| Grant refused|Effective date: 20210609 |
优先权:
申请号 | 申请日 | 专利标题
KR20160079644|2016-06-24|
KR20160079642|2016-06-24|
KR20160079641|2016-06-24|
PCT/KR2017/006609|WO2017222326A1|2016-06-24|2017-06-22|Video signal processing method and device|
[返回顶部]